
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: 'Segoe UI', 'Hiragino Sans', sans-serif;
      background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
      min-height: 100vh;
      color: #fff;
      padding: 15px;
    }
    h1 {
      text-align: center;
      font-size: 1.6rem;
      margin-bottom: 15px;
      text-shadow: 0 0 20px rgba(0, 255, 200, 0.5);
    }
    .container {
      max-width: 1500px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 320px 1fr 320px;
      gap: 15px;
    }
    @media (max-width: 1280px) { .container { grid-template-columns: 1fr; } }
    .panel {
      background: rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 15px;
      border: 1px solid rgba(255,255,255,0.15);
    }
    .panel h2 {
      font-size: 1rem;
      color: #00d4ff;
      margin: 14px 0 10px;
      border-bottom: 2px solid #00d4ff;
      padding-bottom: 6px;
    }
    .panel h2:first-child { margin-top: 0; }

    /* フォーム */
    .form-group { margin-bottom: 10px; }
    .form-group label {
      display: block;
      font-size: 0.82rem;
      color: #aaa;
      margin-bottom: 4px;
    }
    .form-group input, .form-group textarea, .form-group select {
      width: 100%;
      padding: 7px 9px;
      background: rgba(0,0,0,0.3);
      border: 1px solid #444;
      border-radius: 6px;
      color: #fff;
      font-size: 0.88rem;
    }
    .form-group textarea { resize: vertical; min-height: 70px; font-family: inherit; }
    .form-group input:focus, .form-group textarea:focus, .form-group select:focus {
      outline: none; border-color: #00d4ff;
    }
    .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

    .btn {
      width: 100%;
      padding: 10px;
      border: none;
      border-radius: 8px;
      font-size: 0.92rem;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.2s;
      margin-bottom: 6px;
    }
    .btn:hover:not(:disabled) { transform: scale(1.02); filter: brightness(1.1); }
    .btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-generate { background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff; }
    .btn-apply    { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; }
    .btn-copy     { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; }
    .btn-export   { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
    .btn-load     { background: linear-gradient(135deg, #64748b, #475569); color: #fff; }
    .btn-clear    { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid #444; }
    .btn-small    { padding: 7px 10px; font-size: 0.8rem; width: auto; margin: 0; }

    /* エディタ */
    .panel { min-width: 0; }
    .editor-area { min-width: 0; display: flex; flex-direction: column; align-items: center; }
    .frame-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; justify-content: center; }
    .frame-tab {
      padding: 7px 16px;
      background: rgba(255,255,255,0.1);
      border: 2px solid transparent;
      border-radius: 8px;
      color: #fff;
      cursor: pointer;
      font-size: 0.88rem;
    }
    .frame-tab.active { background: rgba(0,212,255,0.3); border-color: #00d4ff; }
    .frame-tab:hover { background: rgba(0,212,255,0.2); }
    .frame-count-controls { display: inline-flex; gap: 4px; margin-left: 8px; }
    .frame-count-btn {
      padding: 7px 10px;
      background: rgba(255,255,255,0.05);
      border: 1px solid #444;
      border-radius: 6px;
      color: #aaa;
      cursor: pointer;
      font-size: 0.85rem;
    }
    .frame-count-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

    .canvas-container {
      position: relative;
      background: #000;
      border: 3px solid #00d4ff;
      border-radius: 8px;
      overflow: auto;
      max-width: 100%;
      max-height: 70vh;
    }
    #editorCanvas { display: block; cursor: crosshair; image-rendering: pixelated; }
    .grid-overlay { position: absolute; top: 0; left: 0; pointer-events: none; }

    .tools {
      display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
      align-items: center;
    }
    .tool-btn {
      padding: 7px 11px;
      background: rgba(255,255,255,0.1);
      border: 2px solid transparent;
      border-radius: 6px;
      color: #fff;
      cursor: pointer;
      font-size: 1rem;
    }
    .tool-btn.active { background: rgba(255,0,255,0.3); border-color: #ff00ff; }
    .tool-btn:hover { background: rgba(255,255,255,0.2); }

    /* パレット */
    .current-color {
      display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
    }
    .color-preview {
      width: 56px; height: 56px;
      border: 3px solid #fff; border-radius: 8px;
      flex-shrink: 0;
    }
    .color-input { flex: 1; }
    .color-input input {
      width: 100%; height: 56px; border: 2px solid #444; border-radius: 8px; cursor: pointer;
      background: transparent; padding: 2px;
    }
    .color-input input:hover { border-color: #00d4ff; }
    .palette-grid {
      display: grid;
      grid-template-columns: repeat(16, minmax(0, 28px));
      gap: 4px;
      width: 100%;
      max-width: 508px;
      padding: 4px;
    }
    .palette-color {
      aspect-ratio: 1;
      min-width: 0;
      padding: 0;
      border: 2px solid transparent;
      border-radius: 4px;
      cursor: pointer;
      touch-action: manipulation;
    }
    .palette-color:hover { border-color: #00d4ff; }
    .palette-color.active { border-color: #fff; box-shadow: 0 0 6px #fff; }
    .palette-color.transparent-color {
      background: repeating-conic-gradient(#666 0% 25%, #999 0% 50%) 50% / 10px 10px;
    }
    @media (max-width: 640px) {
      .palette-grid {
        grid-template-columns: repeat(8, minmax(0, 32px));
        max-width: 292px;
        max-height: 224px;
        overflow-y: auto;
      }
    }

    /* プレビュー */
    .preview-section { text-align: center; }
    .preview-row {
      display: flex; justify-content: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
    }
    .preview-item { text-align: center; }
    .preview-item span { display: block; font-size: 0.75rem; color: #888; margin-bottom: 4px; }
    .preview-canvas, .preview-animation {
      background: #2d6a4f;
      border: 2px solid #444;
      border-radius: 6px;
      image-rendering: pixelated;
    }
    .preview-canvas, .preview-animation { max-width: 100%; max-height: 192px; object-fit: contain; }
    .sample-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .sample-card { color: #eee; background: #162b42; border: 1px solid #466079; border-radius: 8px; padding: 8px; cursor: pointer; }
    .sample-card:hover, .sample-card:focus-visible { border-color: #00d4ff; background: #24445d; }
    .sample-card canvas { display: block; margin: 0 auto 6px; width: 64px; height: 64px; image-rendering: pixelated; background: repeating-conic-gradient(#354353 0% 25%, #293645 0% 50%) 50% / 12px 12px; }
    .sample-card small { display: block; color: #b2c5d6; margin-top: 3px; }
    .preview-animation { border-color: #ff00ff; }
    .speed-control label { font-size: 0.82rem; color: #aaa; }
    .speed-control input { width: 100%; }

    /* AI セクション */
    .api-toggle {
      cursor: pointer; font-size: 0.85rem; color: #00d4ff;
      margin-bottom: 8px; user-select: none;
    }
    .api-section { display: none; padding: 8px; background: rgba(0,0,0,0.2); border-radius: 6px; margin-bottom: 10px; }
    .api-section.open { display: block; }
    .hint { font-size: 0.72rem; color: #888; margin-top: 4px; }
    .status {
      margin-top: 8px; padding: 7px 10px;
      background: rgba(0,0,0,0.3);
      border-radius: 6px;
      font-size: 0.82rem;
      min-height: 32px;
    }
    .status.loading { background: rgba(168, 85, 247, 0.2); color: #c4b5fd; }
    .status.success { background: rgba(34, 197, 94, 0.2); color: #86efac; }
    .status.error   { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
    .response-area {
      background: #0d0d1a;
      border: 1px solid #333;
      border-radius: 6px;
      padding: 8px;
      font-family: monospace;
      font-size: 10px;
      color: #0f0;
      white-space: pre-wrap;
      word-break: break-all;
      max-height: 160px;
      overflow-y: auto;
      margin-top: 6px;
    }
    .template-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
    .template-btn {
      padding: 4px 9px;
      background: rgba(255,255,255,0.08);
      border-radius: 4px;
      font-size: 0.75rem;
      cursor: pointer;
    }
    .template-btn:hover { background: rgba(0,212,255,0.2); }

    /* 画像→ドット絵 */
    .conv-section {
      padding: 10px;
      background: rgba(0,0,0,0.2);
      border-radius: 6px;
      margin-bottom: 10px;
    }
    .conv-section .form-group { margin-bottom: 8px; }
    .image-preview {
      max-width: 100%; max-height: 100px;
      border: 1px solid #444; border-radius: 4px;
      margin-bottom: 8px;
      display: none;
      image-rendering: pixelated;
    }
    .image-preview.shown { display: block; margin: 0 auto 8px; }

    .toast {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: #22c55e;
      color: #fff;
      padding: 12px 24px;
      border-radius: 8px;
      font-weight: bold;
      opacity: 0;
      transition: opacity 0.3s;
      z-index: 1000;
    }
    .toast.show { opacity: 1; }

    /* ヘッダー（タイトル + ヘルプボタン） */
    .header-bar {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      margin-bottom: 15px;
      flex-wrap: wrap;
    }
    .header-bar h1 { margin: 0; }
    .help-btn {
      padding: 8px 16px;
      background: rgba(0,212,255,0.2);
      border: 2px solid #00d4ff;
      border-radius: 20px;
      color: #fff;
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: bold;
      transition: all 0.2s;
    }
    .help-btn:hover { background: rgba(0,212,255,0.4); transform: scale(1.05); }

    /* モーダル */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.75);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2000;
      padding: 20px;
    }
    .modal-overlay.shown { display: flex; }
    .modal {
      background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
      border: 2px solid #00d4ff;
      border-radius: 12px;
      max-width: 720px;
      width: 100%;
      max-height: 85vh;
      overflow-y: auto;
      padding: 24px 28px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    }
    .modal h2 {
      color: #00d4ff;
      border-bottom: 2px solid #00d4ff;
      padding-bottom: 6px;
      margin: 18px 0 10px;
      font-size: 1.1rem;
    }
    .modal h2:first-child { margin-top: 0; }
    .modal p, .modal li { line-height: 1.7; font-size: 0.92rem; color: #e5e7eb; }
    .modal ul, .modal ol { padding-left: 1.4em; margin-bottom: 8px; }
    .modal strong { color: #fde047; }
    .modal code {
      background: rgba(255,255,255,0.1);
      padding: 1px 6px;
      border-radius: 3px;
      font-size: 0.85em;
    }
    .modal-actions {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
      margin-top: 18px;
      flex-wrap: wrap;
    }
    .modal-actions button {
      padding: 10px 20px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-weight: bold;
    }
    .modal-close { background: rgba(255,255,255,0.15); color: #fff; }
    .modal-ok    { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; }

    /* フッター */
    footer.site-footer {
      max-width: 1500px;
      margin: 24px auto 0;
      padding: 16px;
      text-align: center;
      font-size: 0.82rem;
      color: #94a3b8;
      border-top: 1px solid rgba(255,255,255,0.1);
    }
    footer.site-footer a {
      color: #00d4ff;
      text-decoration: none;
    }
    footer.site-footer a:hover { text-decoration: underline; }

    .keyboard-hints {
      font-size: 0.7rem; color: #666; margin-top: 8px;
    }
    .keyboard-hints kbd {
      background: #333; padding: 2px 5px; border-radius: 3px; margin: 0 2px;
    }

    [hidden] { display: none !important; }
    .layer-row { padding:10px;min-height:44px;text-align:left;background:#203047;color:#e3edf7;border:1px solid #52677e;border-radius:6px;overflow-wrap:anywhere; }
    .layer-row[aria-pressed="true"] { background:#155774;border-color:#65ddff; }
    .preview-row { max-height: 320px; overflow: auto; }
    .frame-tabs { max-width: 100%; max-height: 140px; overflow: auto; }
    .container { max-width: 1600px; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; }
    .editor-area { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 12px; }
    @media (min-width: 901px) {
      .editor-area {
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
      }
      .editor-area > * { flex-shrink: 0; }
    }
    .editor-area:focus-visible, .canvas-container:focus-visible {
      outline: 2px solid #7de7ff;
      outline-offset: 2px;
    }
    .settings-panel { grid-column: 2; grid-row: 1; }
    .output-panel { grid-column: 2; grid-row: 2; }
    .drawing-controls { width: 100%; margin-bottom: 8px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 12px; align-items: start; }
    .drawing-controls > .tools { grid-column: 1 / -1; margin-top: 0 !important; }
    .drawing-controls .current-color { float: left; margin: 6px 14px 6px 0; }
    .drawing-controls .color-preview { width: 36px; height: 36px; }
    .drawing-controls .color-input input { width: 52px; height: 36px; }
    .drawing-controls .palette-drawer { clear: none; margin: 0; }
    .drawing-controls .palette-drawer[open] { grid-column: 1 / -1; }
    details { width: 100%; margin: 8px 0; border: 1px solid #506078; border-radius: 8px; padding: 8px 10px; }
    summary { cursor: pointer; min-height: 32px; padding: 6px 0; color: #dce8f5; }
    .featured-tool {
      --feature-accent: #65eadc;
      --feature-bg: #124c54;
      --feature-end: #203b58;
      margin: 14px 0;
      padding: 0;
      border: 2px solid var(--feature-accent);
      border-radius: 12px;
      background: #182b40;
      box-shadow: 0 4px 14px #0003;
    }
    .featured-tool-ai {
      --feature-accent: #c6a2ff;
      --feature-bg: #59358a;
      --feature-end: #343163;
    }
    .featured-tool > summary {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 12px;
      border-radius: 10px;
      background: linear-gradient(120deg, var(--feature-bg), var(--feature-end));
      color: #fff;
      list-style: none;
    }
    .featured-tool > summary::-webkit-details-marker { display: none; }
    .featured-tool > summary:hover { filter: brightness(1.15); }
    .featured-tool > summary:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
    .featured-tool-icon { color: var(--feature-accent); font-size: 28px; flex-shrink: 0; }
    .featured-tool-copy { display: grid; gap: 5px; min-width: 0; }
    .featured-tool-badge {
      justify-self: start;
      padding: 2px 7px;
      border-radius: 4px;
      background: var(--feature-accent);
      color: #18243a;
      font-size: 0.68rem;
      font-weight: 800;
      line-height: 1.4;
    }
    .featured-tool-title { font-size: 0.95rem; font-weight: 700; line-height: 1.55; }
    .featured-tool-description { font-size: 0.73rem; color: #e0e9f7; line-height: 1.6; }
    .featured-tool-chevron { margin-left: auto; font-size: 22px; flex-shrink: 0; }
    .featured-tool[open] { padding: 0 10px 10px; }
    .featured-tool[open] > summary { margin: 0 -10px 12px; border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--feature-accent); }
    .featured-tool[open] .featured-tool-chevron { transform: rotate(180deg); }
    .drawing-tools { clear: both; }
    .tool-btn, .frame-tab, .frame-count-btn, .btn-small { min-height: 44px; min-width: 44px; touch-action: manipulation; }
    button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid #7de7ff; outline-offset: 3px; }
    .canvas-container { max-height: 52vh; overscroll-behavior: contain; border-radius: 4px; }
    #editorCanvas { touch-action: none; user-select: none; -webkit-user-select: none; }
    #editorCanvas.panning { cursor: grab; }
    .canvas-hint { margin-bottom: 8px; }
    .save-panel { width: 100%; border-top: 1px solid #506078; padding-top: 12px; margin-top: 14px; }
    .hint { color: #afbed0; }
    @media (max-width: 900px) {
      body { padding: 8px; }
      .container { grid-template-columns: minmax(0, 1fr); gap: 10px; }
      .editor-area, .settings-panel, .output-panel { grid-column: 1; grid-row: auto; position: static; }
      .panel { padding: 10px; }
      .canvas-container { max-height: 48vh; }
      .drawing-controls { margin-bottom: 6px; }
      h1 { font-size: 1.2rem; }
      .drawing-controls > .tools { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
      .drawing-controls > .tools > button { flex-shrink: 0; }
      .drawing-controls > .tools { gap: 2px; }
      .drawing-tools > .tool-btn { width: 44px; padding: 4px; }
      .drawing-tools > [data-tool="pan"] { font-size: 0; }
      .drawing-tools > [data-tool="pan"]::before { content: '✋'; font-size: 1rem; }
      .drawing-controls .btn-small { padding: 4px; font-size: 0.7rem; }
      .canvas-hint { font-size: 0.72rem; }
    }
    .mobile-nav, .mobile-only { display:none; }
    .edit-more { width:auto; margin:0; padding:0 8px; }
    .edit-more[open] { flex-basis:100%; }
    .edit-more > summary { min-height:44px; }
    @media (min-width: 641px) {
      .edit-more { display:contents; }
      .edit-more > summary { display:none; }
      .edit-more > .tools { display:flex; }
    }
    @media (max-width: 640px) {
      .mobile-only { display:block; }
      .mobile-layer-link { width:100%; padding:8px; margin:0 0 6px; background:#203047; color:#dce8f5; border:1px solid #506078; border-radius:6px; min-height:44px; text-align:left; overflow-wrap:anywhere; }
      .mobile-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; position:sticky; top:0; z-index:30; background:#17243a; padding:6px 0; margin-bottom:8px; }
      .mobile-nav button { min-height:48px; border:1px solid #506078; border-radius:8px; background:#203047; color:#dce8f5; font:inherit; font-size:12px; touch-action:manipulation; }
      .mobile-nav button[aria-pressed="true"] { background:#155774; border-color:#65ddff; color:#fff; box-shadow:inset 0 -3px #65ddff; }
      body[data-mobile-view="draw"] .settings-panel, body[data-mobile-view="draw"] .output-panel,
      body[data-mobile-view="layers"] .editor-area, body[data-mobile-view="layers"] .output-panel,
      body[data-mobile-view="settings"] .editor-area, body[data-mobile-view="settings"] .output-panel,
      body[data-mobile-view="output"] .editor-area, body[data-mobile-view="output"] .settings-panel { display:none; }
      body[data-mobile-view="layers"] .settings-panel > details:not(.layer-disclosure),
      body[data-mobile-view="layers"] .settings-panel > h2,
      body[data-mobile-view="settings"] .layer-disclosure { display:none; }
      .panel { min-width:0; }
      .header-bar { flex-wrap:wrap; gap:6px; margin-bottom:6px; }
      .header-bar h1 { font-size:1.05rem; margin:0; }
      .help-btn { min-height:44px; }
      .drawing-controls > .drawing-tools { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; overflow:visible; width:100%; }
      .drawing-tools > .tool-btn { width:100%; min-height:48px; font-size:1rem; padding:4px 2px; }
      .drawing-tools > .tool-btn::after { content:attr(title); display:block; font-size:10px; line-height:1.3; }
      .drawing-tools > [data-tool="pan"] { font-size:0; }
      .drawing-controls > .edit-actions { flex-wrap:wrap; overflow:visible; gap:4px; }
      .edit-actions > button { flex:1; font-size:12px !important; }
      .edit-more { flex:1; font-size:12px; }
      .edit-more[open] { flex-basis:100%; }
      .edit-more .tools { flex-wrap:wrap; }
      .frame-tabs { flex-wrap:nowrap; justify-content:flex-start; max-height:none; padding-bottom:4px; }
      .frame-tab { flex:0 0 auto; }
      summary { min-height:44px; display:list-item; padding:10px 0; }
      .responsive-disclosure { margin:4px 0; }
      .canvas-hint { display:none; }
      .canvas-container { max-height:55dvh; }
      .tools label { min-height:44px; display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; }
      input[type="checkbox"] { width:20px; height:20px; flex-shrink:0; }
      input[type="range"] { min-height:44px; max-width:100%; }
      input:not([type="checkbox"]):not([type="range"]):not([type="color"]), select, textarea { min-height:44px; font-size:16px !important; max-width:100%; }
      .drawing-controls .color-input input, .drawing-controls .color-preview { height:44px; }
      .save-panel .tools { display:grid; grid-template-columns:1fr; }
      .save-panel .hint { font-size:12px; }
      .layer-row { min-height:48px; }
      #layerList { max-height:40dvh; overflow:auto; }
      .response-area { overflow-wrap:anywhere; max-width:100%; }
    }
  
.ai-image-previews { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
.ai-image-previews canvas { width:100%;height:auto;background:repeating-conic-gradient(#33434d 0% 25%,#263640 0% 50%) 0/16px 16px; }
#aiImagePixel { image-rendering:pixelated; }
/* 保存ダイアログ内のフォーム */
.project-workspace { width:100%; padding:16px; margin-bottom:18px; border:1px solid #5683a0; border-radius:12px; background:#1c2b40; }
.project-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.project-workspace .project-heading h2 { border:0; margin:0; padding:0; color:#e3f7ff; }
.storage-badge { font-size:12px; color:#b5e9dc; background:#203f42; padding:4px 8px; border-radius:20px; }
.project-save-row,.project-open-row { display:flex; gap:10px; align-items:end; }
.project-name-field { flex:1; min-width:0; }
.project-name-field label { display:block; font-size:13px; margin-bottom:6px; color:#d4e2ef; }
.project-workspace input:not([type=file]),.project-workspace select { width:100%; min-height:44px; padding:10px; color:#fff; background:#121c2b; border:1px solid #6a7f96; border-radius:7px; font:inherit; }
.project-workspace button:focus-visible,.project-workspace input:focus-visible,.project-workspace select:focus-visible,.project-workspace summary:focus-visible { outline:3px solid #67e8f9; outline-offset:3px; }
.project-save-row > button,.project-open-row > button { width:auto; min-height:44px; margin:0; flex-shrink:0; }
.project-workspace .hint { color:#bac9db; font-size:12px; line-height:1.7; margin:8px 0; }
.project-workspace #saveStatus { margin-top:10px; font-size:13px; overflow-wrap:anywhere; }
.project-workspace details { margin-top:12px; padding:10px; background:#ffffff05; border:1px solid #485d75; border-radius:8px; width:100%; }
.project-workspace summary { cursor:pointer; font-weight:600; font-size:14px; }
.project-secondary-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.project-secondary-actions button { min-height:40px; }
@media(max-width:600px) {
  .project-workspace { padding:12px; }
  .project-save-row,.project-open-row { flex-direction:column; align-items:stretch; }
  .project-save-row > button,.project-open-row > button { width:100%; }
  .project-secondary-actions { display:grid; grid-template-columns:1fr; }
}
#projectCreatePanel { border-top:1px solid #485d75; margin-top:12px; padding-top:12px; }
/* 保存メニューから開くダイアログ */
#projectDialog { width:min(720px, calc(100% - 24px)); max-height:calc(100dvh - 32px); margin:auto; padding:20px; color:#fff; overflow-y:auto; overscroll-behavior:contain; box-shadow:0 24px 80px #0008; }
#projectDialog::backdrop { background:rgba(8,15,28,.78); }
#projectDialog .project-heading { position:sticky; top:-20px; background:#1c2b40; padding:10px 0; z-index:1; }
#projectDialog .project-heading h2 { font-size:1.1rem; }
#projectMenuName, #projectMenuStatus { overflow-wrap:anywhere; }
@media(max-width:600px) { #projectDialog { padding:14px; max-height:calc(100dvh - 20px); } #projectDialog .project-heading { top:-14px; } }
