/* デザイン案ごとの上書き */
:root[data-theme="upload"] {
  color-scheme: light;
  --background: #f7f9fe;
  --surface: #fff;
  --panel: #f2f4ff;
  --line: #dbe2f2;
  --text: #18223a;
  --muted: #52617c;
  --mint: #3657e2;
  --mint-hover: #2945c0;
  --orange: #ffb372;
}
[data-theme="upload"] .topbar { background: #fff; border-color: var(--line); }
[data-theme="upload"] .hero {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 1.35rem;
  border-color: var(--line);
  background: radial-gradient(ellipse at top, #e5ebff, transparent 77%), #f7f9ff;
}
[data-theme="upload"] .hero-copy { text-align: center; }
[data-theme="upload"] .intro { margin-inline: auto; max-width: 36rem; }
[data-theme="upload"] h1 { font-size: clamp(2rem, 4.6vw, 3.8rem); }
[data-theme="upload"] .input-panel {
  width: min(100%, 40rem);
  background: white;
  border-color: #e1e7f8;
  box-shadow: 0 .85rem 2.4rem #263c9220;
}
[data-theme="upload"] .file-box {
  border-color: #8c9de8;
  background: radial-gradient(circle, #9daef03b 1px, transparent 1px) 0 0 / 17px 17px, #f0f3ff;
}
[data-theme="upload"] .file-box.is-dragging { background-color: #dce5ff; }
[data-theme="upload"] .file-icon { border-color: #5974ea; background: #e1e8ff; }
[data-theme="upload"] .file-icon::before { border-color: #3657e2; }
[data-theme="upload"] .file-icon::after { background: #3657e2; }
[data-theme="upload"] :is(#file-drop-help, .selected-file, summary, .format-chips span) { color: var(--muted); }
[data-theme="upload"] :is(select, button, .format-chips span) { border-color: var(--line); background: #fff; color: var(--text); }
[data-theme="upload"] .format-help { border-color: var(--line); }
[data-theme="upload"] :is(.pick-button, #translate-all, #download):not(:disabled) { background: var(--mint); color: white; }
[data-theme="upload"] :is(.pick-button, #translate-all, #download):not(:disabled):hover { background: var(--mint-hover); }
[data-theme="upload"] button:not(:disabled):hover { background: #edf1ff; }
[data-theme="upload"] button:disabled,
[data-theme="upload"] #translate-all:disabled {
  background: #f0f3fc;
  border-color: var(--line);
  color: #58667d;
}
[data-theme="upload"] #status { border-color: var(--line); background: #f4f6fb; color: #384767; }
[data-theme="upload"] .comparison-row p + p { background: #eef2ff; }

:root[data-theme="console"] {
  --background: #0d1016;
  --surface: #171c26;
  --panel: #202633;
  --line: #333d52;
  --text: #eef2fe;
  --muted: #aab5ca;
  --mint: #b1c4ff;
  --mint-hover: #d3ddff;
  --orange: #dbb079;
}
[data-theme="console"] .topbar { background: #141924; border-color: var(--line); }
[data-theme="console"] .app-icon { background: #303d60; }
[data-theme="console"] .hero {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: .9rem;
  padding: 1rem;
  border-color: var(--line);
  border-radius: .7rem;
  background: var(--surface);
}
[data-theme="console"] h1 { font-size: clamp(1.35rem, 2.4vw, 2.1rem); margin-block: .45rem; text-wrap: wrap; }
[data-theme="console"] .hero-copy { padding: .25rem; }
[data-theme="console"] .intro { font-size: .84rem; }
[data-theme="console"] .input-panel { background: #101623; border-color: var(--line); border-radius: .55rem; }
[data-theme="console"] .file-box { min-height: 11rem; border-color: #6b7fb6; background: #1b2439; }
[data-theme="console"] .file-box.is-dragging { background: #2c3d63; }
[data-theme="console"] .file-icon { border-color: #b1c4ff; background: #2e406c; }
[data-theme="console"] #status { min-height: 12rem; border-color: var(--line); background: #0c111b; color: #c0d1f3; }
[data-theme="console"] .comparison-row p + p { background: #202b43; }
[data-theme="console"] .results { border-radius: .7rem; }

@media (min-width: 56rem) {
  [data-theme="console"] .workspace {
    display: grid;
    grid-template-columns: minmax(16rem, 23rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
  }
  [data-theme="console"] .hero { grid-column: 1; }
  [data-theme="console"] .results { grid-column: 2; grid-row: 1 / span 2; min-height: 21rem; }
  [data-theme="console"] .format-help { grid-column: 1; margin: 0; }
}

@media (max-width: 36rem) {
  .topbar-content { flex-wrap: wrap; gap: .5rem; padding-block: .55rem; }
  .header-controls { gap: .45rem; max-width: 100%; }
  .header-controls select { width: auto; max-width: 8.25rem; }
  .header-controls .language { min-width: 0; }
}

:root[data-theme="editor"] {
  color-scheme: light;
  --background: #f4f0e8;
  --surface: #fffcf6;
  --line: #d6cbbb;
  --text: #2b241c;
  --muted: #665849;
  --mint: #75412e;
  --mint-hover: #592f20;
}
[data-theme="editor"] .topbar { background: #ece3d5; border-color: var(--line); }
[data-theme="editor"] .app-icon { background: #75412e; }
[data-theme="editor"] .app-icon i { background: #f5d8ac; }
[data-theme="editor"] .workspace { width: min(100% - 3rem, 66rem); }
[data-theme="editor"] .hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: 1rem 2rem;
  padding: 1rem 0;
  background: transparent;
  border: 0;
  border-block: 2px solid #76604d;
  border-radius: 0;
}
[data-theme="editor"] h1 {
  font-family: "Bricolage Grotesque", "Yu Mincho", serif;
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  text-wrap: wrap;
}
[data-theme="editor"] .intro { font-size: .92rem; }
[data-theme="editor"] .input-panel { background: var(--surface); border-color: var(--line); border-radius: .25rem; }
[data-theme="editor"] .file-box {
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  min-height: 0;
  padding: .75rem;
  text-align: left;
  border-color: #ad947a;
  border-radius: .2rem;
  background: #f5ede0;
}
[data-theme="editor"] .file-box > :not(.file-icon) { grid-column: 2; }
[data-theme="editor"] .file-icon { grid-row: 1 / span 3; background: #ddc6aa; border-color: #805c3f; }
[data-theme="editor"] .file-icon::before { border-color: #75412e; }
[data-theme="editor"] .file-icon::after { background: #75412e; }
[data-theme="editor"] .file-box.is-dragging { background: #ede0cd; }
[data-theme="editor"] :is(summary, #file-drop-help, .selected-file, .format-chips span) { color: var(--muted); }
[data-theme="editor"] :is(select, button, .format-chips span) { color: var(--text); background: var(--surface); border-color: var(--line); }
[data-theme="editor"] :is(button, select, .pick-button, .results) { border-radius: .22rem; }
[data-theme="editor"] :is(.pick-button, #translate-all, #download):not(:disabled) { background: var(--mint); color: #fff; }
[data-theme="editor"] :is(.pick-button, #translate-all, #download):not(:disabled):hover { background: var(--mint-hover); }
[data-theme="editor"] button:not(:disabled):hover { background: #efe4d3; }
[data-theme="editor"] button:disabled,
[data-theme="editor"] #translate-all:disabled { background: #efe7da; color: #685c4e; border-color: var(--line); }
[data-theme="editor"] .format-help { border-color: var(--line); }
[data-theme="editor"] .format-help { margin-bottom: 1rem; }
[data-theme="editor"] #status { background: #f0e9de; border-color: var(--line); color: #564535; }
[data-theme="editor"] .comparison-row p { font-size: 1rem; line-height: 1.8; }
[data-theme="editor"] .comparison-row p + p { background: #f6ede1; }

:root[data-theme="arcade"] {
  --background: #110d20;
  --surface: #211634;
  --line: #594576;
  --text: #fbf4ff;
  --muted: #d0bbde;
  --mint: #f4c55f;
  --mint-hover: #ffe097;
  --orange: #ff89bf;
}
[data-theme="arcade"] .topbar { background: #1c132c; border-color: var(--line); }
[data-theme="arcade"] .app-icon { background: #503569; border-radius: 0; }
[data-theme="arcade"] .app-icon i { background: #f4c55f; }
[data-theme="arcade"] .app-icon i:nth-child(2) { background: #f78ebe; }
[data-theme="arcade"] .app-icon i:nth-child(3) { background: #ba9aff; }
[data-theme="arcade"] .workspace { width: min(100% - 3rem, 62rem); }
[data-theme="arcade"] .hero {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: .9rem;
  padding: 1.65rem;
  border: 2px solid #8061a9;
  border-radius: 0;
  background: repeating-linear-gradient(0deg, #2c1b44 0 2px, #291941 2px 6px);
  box-shadow: 6px 6px #090713;
}
[data-theme="arcade"] .hero-copy { text-align: center; }
[data-theme="arcade"] h1 { color: #fff0c9; font-size: clamp(1.8rem, 4.4vw, 3.75rem); text-shadow: 3px 3px #67447a; }
[data-theme="arcade"] .intro { margin-inline: auto; max-width: 36rem; font-size: .9rem; }
[data-theme="arcade"] .input-panel { width: min(100%, 35rem); border-radius: 0; border-color: #8663aa; background: #170f26; }
[data-theme="arcade"] .file-box {
  min-height: 10rem;
  padding-block: .95rem;
  border: 2px dashed #a681cf;
  border-radius: 0;
  background: #261735;
}
[data-theme="arcade"] .file-box.is-dragging { background: #3d2955; }
[data-theme="arcade"] .file-icon { border-radius: 0; border-color: #f4c55f; background: #4d3763; }
[data-theme="arcade"] .file-icon::before { border-color: #f4c55f; }
[data-theme="arcade"] .file-icon::after { background: #f4c55f; }
[data-theme="arcade"] :is(#file-drop-help, .selected-file, summary, .format-chips span) { color: var(--muted); }
[data-theme="arcade"] :is(button, select, .pick-button, .results, .format-chips span) { border-radius: 0; }
[data-theme="arcade"] :is(select, button) { border-color: var(--line); background: #302141; color: var(--text); }
[data-theme="arcade"] :is(.pick-button, #translate-all, #download):not(:disabled) {
  background: var(--mint);
  color: #30203f;
  box-shadow: 3px 3px #654458;
}
[data-theme="arcade"] :is(.pick-button, #translate-all, #download):not(:disabled):hover { background: var(--mint-hover); }
[data-theme="arcade"] button:disabled,
[data-theme="arcade"] #translate-all:disabled { background: #291e38; color: #bdaecb; }
[data-theme="arcade"] .format-help { border-color: var(--line); }
[data-theme="arcade"] .format-chips span { border-color: var(--line); }
[data-theme="arcade"] #status { background: #160e25; border-color: var(--line); color: #e5d4fa; }
[data-theme="arcade"] .comparison-row p + p { background: #30203f; }

@media (max-width: 48rem) {
  [data-theme="editor"] .workspace,
  [data-theme="arcade"] .workspace { width: calc(100% - 2rem); }
  [data-theme="editor"] .hero { grid-template-columns: minmax(0, 1fr); }
  [data-theme="editor"] .hero-copy { text-align: left; }
  [data-theme="editor"] .intro { margin-inline: 0; }
  [data-theme="arcade"] .hero { padding: .85rem; }
}

:root[data-theme="mist"] {
  color-scheme: light;
  --background: #f4f5f8;
  --surface: #ffffff;
  --line: #d3dce5;
  --text: #172938;
  --muted: #506373;
  --mint: #00748f;
  --mint-hover: #005e74;
}
[data-theme="mist"] body {
  background:
    radial-gradient(ellipse at 17% 0, #b7e6e9 0, transparent 43%),
    radial-gradient(ellipse at 87% 3%, #eddbf8 0, transparent 40%),
    linear-gradient(#e7f0f6, var(--background) 34rem);
}
[data-theme="mist"] .topbar { background: #ffffffa6; border-color: #ffffff80; }
[data-theme="mist"] .brand { color: #223348; }
[data-theme="mist"] .app-icon { background: #c1e5ea; }
[data-theme="mist"] .app-icon i { background: #00748f; }
[data-theme="mist"] .app-icon i:nth-child(2) { background: #9c81bb; }
[data-theme="mist"] .app-icon i:nth-child(3) { background: #74babb; }
[data-theme="mist"] .workspace { width: min(100% - 2rem, 56rem); padding-top: clamp(1.5rem, 5vw, 3.2rem); }
[data-theme="mist"] .hero {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 1rem;
  padding: 0;
  background: transparent;
  border: 0;
}
[data-theme="mist"] .hero-copy { padding: 0; text-align: center; }
[data-theme="mist"] h1 {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  letter-spacing: -.035em;
  margin-block: .45rem .65rem;
}
[data-theme="mist"] .intro { max-width: 33rem; margin-inline: auto; font-size: .94rem; }
[data-theme="mist"] .input-panel {
  width: min(100%, 34rem);
  border-color: #ffffffd9;
  background: #ffffffc9;
  box-shadow: 0 .75rem 2.4rem #49677b15;
}
[data-theme="mist"] .file-box {
  min-height: 0;
  padding: 1rem clamp(.6rem, 4vw, 1.7rem);
  border-color: #8fb6c2;
  background: #f6fcfd;
}
[data-theme="mist"] .file-box.is-dragging { background: #e2f7fa; }
[data-theme="mist"] .file-icon { border-color: #00748f; background: #e2f5f7; }
[data-theme="mist"] .file-icon::before { border-color: #00748f; }
[data-theme="mist"] .file-icon::after { background: #00748f; }
[data-theme="mist"] .pick-button { width: min(100%, 21rem); }
[data-theme="mist"] .extra-inputs { justify-content: center; }
[data-theme="mist"] :is(#file-drop-help, .selected-file, summary, .format-chips span) { color: var(--muted); }
[data-theme="mist"] :is(select, button, .format-chips span) { border-color: var(--line); background: var(--surface); color: var(--text); }
[data-theme="mist"] :is(.pick-button, #translate-all, #download):not(:disabled) { background: var(--mint); color: white; }
[data-theme="mist"] :is(.pick-button, #translate-all, #download):not(:disabled):hover { background: var(--mint-hover); }
[data-theme="mist"] button:not(:disabled):hover { background: #eaf4f7; }
[data-theme="mist"] button:disabled,
[data-theme="mist"] #translate-all:disabled { background: #edf2f6; border-color: var(--line); color: #526477; }
[data-theme="mist"] .format-help { border-color: var(--line); }
[data-theme="mist"] #status { background: #f1f6f9; border-color: var(--line); color: #384e5f; }
[data-theme="mist"] .comparison-row p + p { background: #edf8fa; }

.glass-nav, .glass-dock { display: none; }

:root[data-theme="glass-dark"] {
  --background: #100e12;
  --surface: #1b171a;
  --line: #ffffff34;
  --text: #fcf7f5;
  --muted: #c5b8bd;
  --mint: #52d7ee;
  --mint-hover: #8feeff;
  --glass-panel: linear-gradient(145deg, #ffffff13, #ffffff04 52%), #1b1518b8;
  --glass-inset: #131317cf;
  --glass-page: radial-gradient(ellipse at 48% -10%, #593022 0%, #2e1820 37%, transparent 70%), #100e12;
  --glass-action-text: #072830;
  --glass-shadow: #00000030;
}
:root[data-theme="glass-light"] {
  color-scheme: light;
  --background: #f2f3f6;
  --surface: #fbfbfd;
  --line: #63403b20;
  --text: #25252b;
  --muted: #5a5a64;
  --mint: #00778e;
  --mint-hover: #006377;
  --glass-panel: linear-gradient(145deg, #ffffffc2, #ffffff63 54%), #f8f2f3b0;
  --glass-inset: #ffffffce;
  --glass-page: radial-gradient(ellipse at 48% -15%, #f5cabb 0%, #fae4de 40%, transparent 72%), #f2f3f6;
  --glass-action-text: #ffffff;
  --glass-shadow: #634a4d16;
}

[data-theme^="glass-"] body { background: var(--glass-page); }
[data-theme^="glass-"] .shell { width: min(100% - 2.5rem, 105rem); }

[data-theme^="glass-"] :is(.topbar, .glass-nav, .hero, .results, .glass-dock) {
  background: var(--glass-panel);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: 0 .5rem 1.75rem var(--glass-shadow), inset 0 1px #ffffff25;
  backdrop-filter: blur(18px);
}

[data-theme^="glass-"] .topbar {
  width: min(100% - 2.5rem, 105rem);
  margin: 1rem auto 0;
}
[data-theme^="glass-"] .topbar-content { width: calc(100% - 2rem); min-height: 3.8rem; }
[data-theme^="glass-"] .app-icon { background: #b1613761; }
[data-theme^="glass-"] .app-icon i { background: #e29567; }
[data-theme^="glass-"] .app-icon i:nth-child(2) { background: var(--mint); }
[data-theme^="glass-"] .app-icon i:nth-child(3) { background: #c87b65; }

[data-theme^="glass-"] .workspace {
  display: grid;
  grid-template-columns: auto minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-areas: "nav input results" "nav formats results" "dock dock dock";
  gap: .9rem;
  padding: .9rem 0 1.4rem;
}

[data-theme^="glass-"] .glass-nav {
  grid-area: nav;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .66rem .42rem;
}
[data-theme^="glass-"] .glass-nav a {
  padding: .6rem .5rem;
  border-radius: .62rem;
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}
[data-theme^="glass-"] .glass-nav a:hover { background: var(--glass-inset); color: var(--text); }

[data-theme^="glass-"] .hero {
  grid-area: input;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: .95rem;
  padding: clamp(.8rem, 2vw, 1.55rem);
}
[data-theme^="glass-"] .hero-copy { padding: 0; text-align: left; }
[data-theme^="glass-"] h1 { font-size: clamp(1.6rem, 3vw, 2.7rem); margin-block: .4rem .55rem; text-wrap: wrap; }
[data-theme^="glass-"] .intro { margin-inline: 0; font-size: .89rem; }
[data-theme^="glass-"] .input-panel { background: var(--glass-inset); border-color: var(--line); }
[data-theme^="glass-"] .file-box {
  min-height: 10.7rem;
  padding: 1rem .6rem;
  border-color: color-mix(in srgb, var(--mint), transparent 45%);
  background: transparent;
}
[data-theme^="glass-"] .file-box.is-dragging { background: color-mix(in srgb, var(--mint), transparent 88%); }
[data-theme^="glass-"] .file-icon {
  border-color: var(--mint);
  background: color-mix(in srgb, var(--mint), transparent 85%);
}
[data-theme^="glass-"] .file-icon::before { border-color: var(--mint); }
[data-theme^="glass-"] .file-icon::after { background: var(--mint); }

[data-theme^="glass-"] :is(#file-drop-help, .selected-file, summary, .format-chips span) { color: var(--muted); }
[data-theme^="glass-"] :is(select, button, .format-chips span) {
  border-color: var(--line);
  background: var(--glass-inset);
  color: var(--text);
}
[data-theme^="glass-"] :is(.pick-button, #translate-all, #download):not(:disabled) { background: var(--mint); color: var(--glass-action-text); }
[data-theme^="glass-"] :is(.pick-button, #translate-all, #download):not(:disabled):hover { background: var(--mint-hover); }
[data-theme^="glass-"] button:disabled,
[data-theme^="glass-"] #translate-all:disabled { background: var(--glass-inset); border-color: var(--line); color: var(--muted); }
[data-theme^="glass-"] .extra-inputs { padding-top: .6rem; gap: .48rem 1rem; }
[data-theme^="glass-"] .format-help { grid-area: formats; margin: 0; border: 0; padding: .2rem .65rem; }
[data-theme^="glass-"] .results { grid-area: results; min-width: 0; }
[data-theme^="glass-"] .results-header { padding: 1rem; }
[data-theme^="glass-"] #status {
  min-height: 6.5rem;
  margin: 0 .8rem .8rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: var(--glass-inset);
  color: var(--muted);
}
[data-theme^="glass-"] .comparison-row p + p { background: color-mix(in srgb, var(--mint), transparent 91%); }

[data-theme^="glass-"] .glass-dock {
  grid-area: dock;
  display: flex;
  justify-content: center;
  padding: .85rem 1rem;
}
[data-theme^="glass-"] .glass-dock .actions { justify-content: center; }

@media (max-width: 52rem) {
  [data-theme^="glass-"] .shell { width: calc(100% - 1.5rem); }
  [data-theme^="glass-"] .topbar { width: calc(100% - 1.5rem); margin-top: .6rem; }
  [data-theme^="glass-"] .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "nav" "input" "formats" "results" "dock";
  }
  [data-theme^="glass-"] .glass-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .25rem;
    padding: .25rem .4rem;
  }
  [data-theme^="glass-"] .glass-nav a { padding: .45rem .55rem; }
  [data-theme^="glass-"] .glass-dock .actions { width: min(100%, 30rem); }
}

:root[data-theme="studio"] {
  color-scheme: light;
  --background: #eef0f8;
  --surface: #fbfcff;
  --line: #ced5e6;
  --text: #18233a;
  --muted: #4f607a;
  --mint: #3948d7;
  --mint-hover: #2b36ad;
}
[data-theme="studio"] body {
  background:
    radial-gradient(ellipse at 7% 0%, #d7eee9 0%, transparent 45%),
    radial-gradient(ellipse at 90% -10%, #dcdafa 0%, transparent 55%),
    var(--background);
}
[data-theme="studio"] .shell { width: min(100% - 2rem, 75rem); }
[data-theme="studio"] .topbar {
  width: min(100% - 2rem, 75rem);
  margin: .85rem auto 0;
  border: 1px solid #ffffffc9;
  border-radius: .9rem;
  background: #ffffffb8;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 30px #263e6410;
}
[data-theme="studio"] .topbar-content { min-height: 3.6rem; width: calc(100% - 1.75rem); }
[data-theme="studio"] .app-icon { background: #24345a; }
[data-theme="studio"] .app-icon i { background: #a8e0d7; }
[data-theme="studio"] .app-icon i:nth-child(2) { background: #f9ac82; }
[data-theme="studio"] .app-icon i:nth-child(3) { background: #9dacf2; }

[data-theme="studio"] .workspace {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-areas: "intro result" "input result" "formats result" "dock dock";
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  gap: .85rem 1.05rem;
  padding-top: clamp(1.2rem, 4vw, 2.8rem);
}
[data-theme="studio"] .hero { display: contents; }
[data-theme="studio"] .hero-copy {
  grid-area: intro;
  padding: .15rem .55rem .35rem;
  text-align: left;
}
[data-theme="studio"] .translation-pair { letter-spacing: .05em; }
[data-theme="studio"] h1 {
  max-width: 15ch;
  font-size: clamp(2rem, 3.9vw, 3.25rem);
  line-height: 1.1;
  margin-block: .45rem .65rem;
  text-wrap: wrap;
}
[data-theme="studio"] .intro { margin-inline: 0; max-width: 31rem; font-size: .94rem; }
[data-theme="studio"] .input-panel {
  grid-area: input;
  padding: .7rem;
  background: #ffffffde;
  border-color: #fff;
  border-radius: .85rem;
  box-shadow: 0 12px 27px #253e6519;
}
[data-theme="studio"] .file-box {
  min-height: 13rem;
  border-color: #8f9bdb;
  background: radial-gradient(circle, #5a69c533 1px, transparent 1px) 0 0 / 16px 16px, #f0f2ff;
}
[data-theme="studio"] .file-box.is-dragging { background-color: #e1e5ff; }
[data-theme="studio"] .file-icon {
  background: #dfe4ff;
  border-color: #6977d9;
}
[data-theme="studio"] .file-icon::before { border-color: var(--mint); }
[data-theme="studio"] .file-icon::after { background: var(--mint); }
[data-theme="studio"] .pick-button { min-width: min(100%, 13rem); }
[data-theme="studio"] :is(summary, #file-drop-help, .selected-file, .format-chips span) { color: var(--muted); }
[data-theme="studio"] :is(select, button, .format-chips span) { background: white; color: var(--text); border-color: var(--line); }
[data-theme="studio"] button:not(:disabled):hover { background: #edf0ff; }
[data-theme="studio"] :is(.pick-button, #translate-all, #download):not(:disabled) { background: var(--mint); color: white; }
[data-theme="studio"] :is(.pick-button, #translate-all, #download):not(:disabled):hover { background: var(--mint-hover); }
[data-theme="studio"] button:disabled,
[data-theme="studio"] #translate-all:disabled { background: #edf0f7; border-color: #dbe1ed; color: #52617a; }

[data-theme="studio"] .format-help { grid-area: formats; margin: 0; padding: .25rem .5rem .5rem; border-color: #ccd5e5; }
[data-theme="studio"] .results {
  grid-area: result;
  align-self: stretch;
  min-height: 22rem;
  background: #19243b;
  border-color: #26344f;
  color: #f7f8ff;
  box-shadow: 0 12px 34px #17264323;
}
[data-theme="studio"] .results-header { border-bottom: 1px solid #33415b; padding: 1rem 1.1rem; }
[data-theme="studio"] #status {
  border-top: 0;
  min-height: 5.75rem;
  background: #141e33;
  color: #cad6ee;
  padding-inline: 1.1rem;
}
[data-theme="studio"] .comparison,
[data-theme="studio"] :is(.comparison-row, .comparison-row p + p, .comparison h3:nth-child(2)) { border-color: #394963; }
[data-theme="studio"] .comparison h3 { color: #b9c7e0; }
[data-theme="studio"] .comparison h3:nth-child(2) { color: #bfeade; }
[data-theme="studio"] .comparison-row p + p { background: #1f3845; }

[data-theme="studio"] .glass-dock {
  grid-area: dock;
  display: flex;
  justify-content: flex-end;
  padding: .7rem;
  border: 1px solid #fff;
  border-radius: .85rem;
  background: #ffffffbc;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 25px #253e6515;
}
[data-theme="studio"] .glass-dock .actions { justify-content: end; }

@media (max-width: 48rem) {
  [data-theme="studio"] .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "input" "formats" "result" "dock";
    grid-template-rows: none;
  }
  [data-theme="studio"] .hero-copy { padding-inline: .25rem; }
  [data-theme="studio"] .results { min-height: 0; }
  [data-theme="studio"] .glass-dock .actions { width: 100%; }
}

:root[data-theme="desk"] {
  color-scheme: light;
  --background: #f4f4f2;
  --surface: #fff;
  --line: #ddddda;
  --text: #242723;
  --muted: #61685e;
  --mint: #386c37;
  --mint-hover: #295329;
}
[data-theme="desk"] body { background: var(--background); }
[data-theme="desk"] .shell { width: min(100% - 2rem, 78rem); }
[data-theme="desk"] .topbar { background: #fff; border-color: var(--line); }
[data-theme="desk"] .topbar-content { min-height: 3.8rem; }
[data-theme="desk"] .app-icon { background: #eef1e8; }
[data-theme="desk"] .app-icon i { background: #507c42; }
[data-theme="desk"] .app-icon i:nth-child(2) { background: #d5915a; }
[data-theme="desk"] .app-icon i:nth-child(3) { background: #91a27c; }
[data-theme="desk"] .workspace {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  grid-template-areas: "nav input" "nav formats" "nav result" "nav dock";
  gap: .85rem 2rem;
  padding-top: 1.6rem;
}
[data-theme="desk"] .glass-nav {
  grid-area: nav;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .35rem;
  border-right: 1px solid var(--line);
  padding-right: 1rem;
}
[data-theme="desk"] .glass-nav a {
  padding: .7rem .8rem;
  border-radius: .45rem;
  font-size: .88rem;
  color: var(--muted);
}
[data-theme="desk"] .glass-nav a:first-child { background: #e5ecdf; color: #365a2d; font-weight: 700; }
[data-theme="desk"] .glass-nav a:hover { background: #e9ece5; }
[data-theme="desk"] .hero {
  grid-area: input;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  gap: 1.2rem;
  background: transparent;
  border: 0;
}
[data-theme="desk"] .hero-copy { text-align: left; padding: .15rem 0; }
[data-theme="desk"] h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin-block: .45rem .65rem; }
[data-theme="desk"] .intro { max-width: none; margin-inline: 0; font-size: .92rem; }
[data-theme="desk"] .input-panel { padding: 1rem; border-radius: .6rem; border-color: var(--line); background: #fff; }
[data-theme="desk"] .file-box {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: start;
  gap: .25rem 1rem;
  min-height: 0;
  padding: 1.15rem;
  border: 1px dashed #a5b69b;
  border-radius: .35rem;
  background: #f5f8f1;
  text-align: left;
}
[data-theme="desk"] .file-icon { grid-column: 1; grid-row: 1 / span 2; border-color: #69845d; background: #e3ecd9; }
[data-theme="desk"] .file-icon::before { border-color: #386c37; }
[data-theme="desk"] .file-icon::after { background: #386c37; }
[data-theme="desk"] .drop-title { grid-column: 2; grid-row: 1; font-size: .96rem; }
[data-theme="desk"] #file-drop-help { grid-column: 2; grid-row: 2; }
[data-theme="desk"] .pick-button { grid-column: 3; grid-row: 1 / span 2; min-width: 0; margin: 0; }
[data-theme="desk"] .selected-file { grid-column: 2 / -1; }
[data-theme="desk"] .file-box.is-dragging { background: #e4eedb; }
[data-theme="desk"] :is(summary, #file-drop-help, .selected-file, .format-chips span) { color: var(--muted); }
[data-theme="desk"] :is(select, button, .format-chips span) { background: #fff; color: var(--text); border-color: var(--line); }
[data-theme="desk"] :is(select, button, .pick-button) { border-radius: .35rem; }
[data-theme="desk"] :is(.pick-button, #translate-all, #download):not(:disabled) { background: var(--mint); color: #fff; }
[data-theme="desk"] :is(.pick-button, #translate-all, #download):not(:disabled):hover { background: var(--mint-hover); }
[data-theme="desk"] button:disabled,
[data-theme="desk"] #translate-all:disabled { background: #f0f1ed; color: #646c60; border-color: var(--line); }
[data-theme="desk"] .extra-inputs { padding-top: .8rem; }
[data-theme="desk"] .format-help { grid-area: formats; border: 0; margin: 0; padding: .1rem; }
[data-theme="desk"] .results { grid-area: result; background: white; border-radius: .6rem; }
[data-theme="desk"] .results-header { padding: .8rem 1rem; }
[data-theme="desk"] #status { min-height: 5rem; background: #fafbf8; color: #54604b; border-color: var(--line); }
[data-theme="desk"] .comparison-row p + p { background: #f1f6eb; }
[data-theme="desk"] .glass-dock { grid-area: dock; display: flex; justify-content: flex-end; padding: .15rem 0; }
[data-theme="desk"] .glass-dock .actions { justify-content: flex-end; }

@media (max-width: 48rem) {
  [data-theme="desk"] .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "nav" "input" "formats" "result" "dock";
    gap: 1rem;
  }
  [data-theme="desk"] .glass-nav { flex-direction: row; flex-wrap: wrap; border: 0; border-bottom: 1px solid var(--line); padding: 0 0 .7rem; }
}
@media (max-width: 35rem) {
  [data-theme="desk"] .file-box { grid-template-columns: auto minmax(0, 1fr); padding: .9rem; gap: .4rem .75rem; }
  [data-theme="desk"] .pick-button { grid-column: 1 / -1; grid-row: 3; width: 100%; margin-top: .3rem; }
  [data-theme="desk"] .selected-file { grid-column: 1 / -1; }
  [data-theme="desk"] .glass-dock .actions { width: 100%; }
}

.version-status {
  flex-basis: 100%;
  margin-top: .35rem;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
