:root {
  --bg: #111820;
  --bg-2: #17212b;
  --panel: rgba(23, 30, 36, 0.92);
  --panel-strong: #202930;
  --paper: #eee9dd;
  --paper-2: #d9d0bd;
  --ink: #1c2123;
  --text: #f4efe4;
  --muted: #a99f8c;
  --line: rgba(238, 225, 196, 0.18);
  --line-strong: rgba(224, 190, 119, 0.46);
  --gold: #d6b36c;
  --gold-soft: rgba(214, 179, 108, 0.18);
  --blue: #79b9cb;
  --blue-soft: rgba(121, 185, 203, 0.15);
  --red: #b8665f;
  --shadow: rgba(4, 8, 12, 0.44);
  --radius: 8px;
  --font: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Avenir Next", system-ui, sans-serif;
  --display: "Avenir Next", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  background:
    linear-gradient(180deg, rgba(17, 24, 32, 0.9), rgba(12, 17, 23, 0.98)),
    linear-gradient(120deg, rgba(121, 185, 203, 0.12), transparent 32%, rgba(214, 179, 108, 0.08));
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(238, 225, 196, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 225, 196, 0.018) 1px, transparent 1px);
  background-size: 38px 38px;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 30;
  content: "";
  pointer-events: none;
  opacity: 0.12;
  background-image: repeating-linear-gradient(
    112deg,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 5px
  );
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  border-radius: var(--radius);
}

input,
select,
textarea {
  width: 100%;
  color: var(--text);
  background: rgba(11, 15, 18, 0.82);
  border: 1px solid var(--line);
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  resize: vertical;
  padding: 11px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 179, 108, 0.16);
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  display: block;
  padding: 0;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

img {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
strong,
span,
small,
button,
label {
  overflow-wrap: anywhere;
}

.app-shell {
  position: relative;
  width: min(1480px, calc(100% - 32px));
  min-height: calc(100dvh - 32px);
  margin: 16px auto;
  border: 1px solid rgba(214, 179, 108, 0.22);
  background:
    linear-gradient(180deg, rgba(31, 40, 48, 0.82), rgba(14, 19, 24, 0.92)),
    rgba(17, 24, 32, 0.96);
  border-radius: 12px;
  box-shadow:
    0 24px 90px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: clip;
}

.app-shell::before,
.app-shell::after {
  position: absolute;
  inset: 10px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(214, 179, 108, 0.32);
  border-radius: 10px;
}

.app-shell::after {
  inset: auto 22px 18px 22px;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(214, 179, 108, 0.62), transparent);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(120px, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 14px 24px;
  background: rgba(14, 19, 24, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: min(360px, 100%);
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
}

.panel-head h1,
.panel-head h2 {
  font-family: var(--display);
  letter-spacing: 0;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: min(100%, 430px);
  padding: 4px;
  background: rgba(6, 9, 12, 0.64);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mode-button,
.icon-action,
.tool-button,
.command-button {
  border: 1px solid transparent;
  background: transparent;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mode-button svg {
  width: 17px;
  height: 17px;
}

.mode-button.is-active {
  color: var(--paper);
  background: rgba(214, 179, 108, 0.14);
  border-color: rgba(214, 179, 108, 0.34);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-action {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.icon-action:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.mode-button:hover,
.mode-button:focus-visible,
.icon-action:hover,
.icon-action:focus-visible,
.tool-button:hover,
.tool-button:focus-visible,
.command-button:hover,
.command-button:focus-visible {
  border-color: rgba(214, 179, 108, 0.45);
  background: rgba(214, 179, 108, 0.12);
}

.mode-button:active,
.icon-action:active,
.tool-button:active,
.command-button:active,
.upload-tile:active {
  transform: translateY(1px) scale(0.99);
}

.ad-slot {
  position: relative;
  z-index: 1;
  padding: 16px 24px 0;
}

.ad-frame {
  display: grid;
  place-items: center;
  width: min(100%, 970px);
  min-height: 90px;
  margin: 0 auto;
  color: rgba(238, 225, 196, 0.46);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(121, 185, 203, 0.08), rgba(214, 179, 108, 0.07)),
    rgba(6, 9, 12, 0.48);
  border: 1px dashed rgba(214, 179, 108, 0.32);
  border-radius: var(--radius);
  overflow: hidden;
}

.ad-frame ins,
.ad-frame iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

.ad-frame .adsbygoogle {
  min-height: 90px;
}

.ad-slot-card-bottom {
  width: min(100%, 820px);
  padding: 0;
}

.card-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.ad-slot-card-bottom .ad-frame {
  width: 100%;
  min-height: 250px;
}

.ad-slot-card-bottom .adsbygoogle {
  min-height: 250px;
}

.workspace {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1.12fr);
  gap: 24px;
  align-items: start;
  padding: 24px;
  scroll-margin-top: 96px;
}

.workspace > .ad-slot {
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 0;
}

.card-stage {
  position: sticky;
  top: 104px;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 14px;
  place-items: center;
  align-content: start;
  width: 100%;
  min-width: 0;
}

.panel {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow:
    0 18px 60px rgba(4, 8, 12, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.screen-edit .direct-panel,
.screen-edit .preview-panel,
.screen-direct .edit-panel,
.screen-direct .preview-panel,
.screen-preview .edit-panel,
.screen-preview .direct-panel {
  display: none;
}

.panel-head {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.panel-kicker {
  margin: 0;
  color: var(--gold);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-head h1,
.panel-head h2 {
  margin: 0;
  color: var(--paper);
  font-size: 26px;
  line-height: 1.2;
}

.control-form {
  display: grid;
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field-group > span,
.field-group > legend,
.settings-grid span {
  color: var(--paper-2);
  font-size: 13px;
  font-weight: 800;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.style-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-pill {
  position: relative;
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: rgba(11, 15, 18, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
}

.check-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.check-pill span {
  position: relative;
  min-width: 0;
  padding-left: 18px;
}

.check-pill span::before {
  position: absolute;
  top: 48%;
  left: 1px;
  width: 8px;
  height: 13px;
  content: "";
  border-right: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  opacity: 0;
  transform: translateY(-58%) rotate(42deg) scale(0.92);
  transform-origin: center;
  transition: opacity 140ms cubic-bezier(0.16, 1, 0.3, 1), transform 140ms cubic-bezier(0.16, 1, 0.3, 1);
}

.check-pill:has(input:checked) span::before {
  opacity: 1;
  transform: translateY(-58%) rotate(42deg) scale(1);
}

.check-pill:has(input:checked) {
  color: var(--paper);
  border-color: rgba(214, 179, 108, 0.28);
  background: rgba(214, 179, 108, 0.08);
}

.check-pill:has(input:focus-visible) {
  outline: 2px solid rgba(214, 179, 108, 0.72);
  outline-offset: 2px;
}

.platform-ps5-option {
  display: none;
}

.template-ps5 .platform-ps5-option {
  display: flex;
}

.upload-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 0 14px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
  background:
    linear-gradient(135deg, rgba(121, 185, 203, 0.18), rgba(214, 179, 108, 0.12)),
    rgba(11, 15, 18, 0.76);
  border: 1px dashed rgba(214, 179, 108, 0.5);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.upload-tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-tile svg {
  color: var(--gold);
}

.source-link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(11, 15, 18, 0.58);
  border: 1px solid rgba(214, 179, 108, 0.34);
  border-radius: var(--radius);
  transition: border-color 180ms cubic-bezier(0.16, 1, 0.3, 1), background 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.source-link:hover {
  background: rgba(214, 179, 108, 0.1);
  border-color: rgba(214, 179, 108, 0.58);
}

.source-link:focus-visible {
  outline: 2px solid rgba(214, 179, 108, 0.72);
  outline-offset: 2px;
}

.source-link svg {
  width: 18px;
  height: 18px;
}

.card-viewport {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 820px);
  min-height: auto;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.card-viewport::before {
  display: none;
}

.profile-card {
  --card-accent: var(--gold);
  --card-accent-soft: rgba(214, 179, 108, 0.2);
  --card-bg: #12171a;
  --card-bg-2: #273039;
  --field-bg: rgba(237, 232, 219, 0.92);
  --field-line: rgba(46, 37, 26, 0.32);
  position: relative;
  display: grid;
  grid-template-columns: 39% 1fr;
  grid-template-rows: 1fr auto;
  gap: 10px;
  width: min(100%, 780px);
  aspect-ratio: 1.55;
  min-width: 0;
  padding: 12px;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(135deg, var(--card-bg-2), var(--card-bg) 52%, #080b0d 100%);
  border: 1px solid rgba(214, 179, 108, 0.72);
  border-radius: 8px;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.34),
    inset 0 0 0 2px rgba(238, 225, 196, 0.08);
  isolation: isolate;
}

.profile-card::before,
.profile-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.profile-card::before {
  inset: 6px;
  border: 1px solid rgba(214, 179, 108, 0.36);
  border-radius: 5px;
}

.profile-card::after {
  inset: 0;
  opacity: 0.11;
  background-image: repeating-linear-gradient(110deg, #fff 0, #fff 1px, transparent 1px, transparent 6px);
  mix-blend-mode: screen;
}

.profile-card.theme-azure {
  --card-accent: #87bed1;
  --card-accent-soft: rgba(135, 190, 209, 0.22);
  --card-bg: #0d1a21;
  --card-bg-2: #244253;
}

.profile-card.theme-ember {
  --card-accent: #d69a70;
  --card-accent-soft: rgba(214, 154, 112, 0.22);
  --card-bg: #1c1412;
  --card-bg-2: #493128;
}

.profile-card.size-small {
  font-size: 12px;
}

.profile-card.size-medium {
  font-size: 13px;
}

.profile-card.size-large {
  font-size: 14px;
}

.profile-card.size-xlarge {
  font-size: 15px;
}

.profile-card.spacing-compact {
  gap: 7px;
  padding: 9px;
}

.profile-card.spacing-wide {
  gap: 13px;
  padding: 15px;
}

.corner {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-color: var(--card-accent);
  pointer-events: none;
}

.corner-tl {
  top: 7px;
  left: 7px;
  border-top: 2px solid;
  border-left: 2px solid;
  border-radius: 6px 0 0 0;
}

.corner-tr {
  top: 7px;
  right: 7px;
  border-top: 2px solid;
  border-right: 2px solid;
  border-radius: 0 6px 0 0;
}

.corner-bl {
  bottom: 7px;
  left: 7px;
  border-bottom: 2px solid;
  border-left: 2px solid;
  border-radius: 0 0 0 6px;
}

.corner-br {
  right: 7px;
  bottom: 7px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  border-radius: 0 0 6px 0;
}

.portrait-block,
.info-board button {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--field-line);
  background: var(--field-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.portrait-block {
  grid-column: 1;
  grid-row: 1;
  display: block;
  overflow: hidden;
  border-color: rgba(214, 179, 108, 0.55);
}

#portraitImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(117, 184, 214, 0.9), rgba(235, 226, 192, 0.2) 55%, rgba(28, 42, 43, 0.88)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.24), transparent 42%);
}

.portrait-fallback span {
  position: absolute;
  display: block;
}

.portrait-fallback .sky {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.36;
}

.portrait-fallback .moon {
  top: 9%;
  right: 13%;
  width: 38px;
  height: 38px;
  background: rgba(246, 239, 221, 0.84);
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(246, 239, 221, 0.32);
}

.hair-left,
.hair-right {
  top: 17%;
  width: 36%;
  height: 48%;
  background: linear-gradient(180deg, #ead18d, #c8874f 82%);
  border-radius: 54% 44% 34% 52%;
  filter: drop-shadow(0 10px 14px rgba(54, 24, 12, 0.34));
}

.hair-left {
  left: 24%;
  transform: rotate(-16deg);
}

.hair-right {
  right: 18%;
  transform: rotate(14deg);
}

.face {
  top: 28%;
  left: 38%;
  width: 24%;
  height: 22%;
  background: #f3d0ad;
  border-radius: 48% 48% 42% 42%;
  box-shadow:
    0 22px 0 -6px #f3d0ad,
    0 -11px 0 4px #d99a5c;
}

.cape {
  right: 9%;
  bottom: 2%;
  width: 42%;
  height: 42%;
  background: linear-gradient(150deg, #2c6780, #173847);
  border-radius: 70% 15% 10% 80%;
  transform: rotate(14deg);
}

.armor {
  bottom: -7%;
  left: 25%;
  width: 52%;
  height: 34%;
  background:
    linear-gradient(115deg, transparent 0 26%, rgba(214, 179, 108, 0.72) 27% 33%, transparent 34%),
    linear-gradient(180deg, #f1eee3, #816e5a);
  border-radius: 48% 48% 18% 18%;
}

.field-card small,
.comment-card small,
.name-card small {
  display: block;
  color: #6f5d40;
  font-size: 0.78em;
  font-weight: 900;
}

.info-board {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-rows: minmax(48px, 0.74fr) minmax(0, 2fr) minmax(58px, 0.82fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.name-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 6px 10px;
}

.name-avatar {
  width: 42px;
  height: 42px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), transparent 0 34%, rgba(238, 225, 196, 0.74) 36%),
    #eee9dd;
  border: 1px solid var(--field-line);
  border-radius: 50%;
}

.name-card strong {
  display: block;
  color: #282018;
  font-size: 1.36em;
  line-height: 1.22;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.field-card {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 0;
  padding: 6px 8px;
  overflow: hidden;
}

.field-card.wide {
  grid-column: span 2;
}

.field-card strong,
.comment-card span {
  color: #2c241b;
  font-size: 0.94em;
  font-weight: 800;
  line-height: 1.42;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  color: #2d261d;
  font-size: 0.82em;
  font-weight: 900;
  line-height: 1;
  background: rgba(214, 179, 108, 0.22);
  border: 1px solid rgba(91, 72, 44, 0.22);
  border-radius: 4px;
}

.comment-card {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  padding: 7px 8px;
  overflow: hidden;
}

.editable-target {
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    outline-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.editable-target:hover,
.editable-target:focus-visible,
.editable-target.is-selected {
  outline: 2px solid rgba(121, 185, 203, 0.86);
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(121, 185, 203, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.editable-target:active {
  transform: scale(0.995);
}

.profile-card {
  position: relative;
  display: block;
  width: min(100%, 900px);
  aspect-ratio: 1276 / 843;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: #4a453d;
  background: #151719;
  border: 1px solid rgba(214, 179, 108, 0.38);
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  container-type: inline-size;
}

.profile-card::before,
.profile-card::after {
  display: none;
}

.profile-card.size-small {
  font-size: 10px;
}

.profile-card.size-medium {
  font-size: 12px;
}

.profile-card.size-large {
  font-size: 14px;
}

.profile-card.size-xlarge {
  font-size: 16px;
}

.profile-card.spacing-compact,
.profile-card.spacing-standard,
.profile-card.spacing-wide {
  gap: 0;
  padding: 0;
}

.template-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.overlay-field,
.overlay-zone,
.overlay-check,
.icon-overlay {
  position: absolute;
  z-index: 2;
  margin: 0;
  border: 0;
  background: transparent;
}

.overlay-field {
  display: block;
  padding: 0;
  color: rgba(48, 45, 40, 0.92);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

.profile-card.theme-azure .overlay-field {
  color: rgba(32, 73, 93, 0.94);
}

.profile-card.theme-ember .overlay-field {
  color: rgba(96, 58, 41, 0.94);
}

.profile-card.theme-forest .overlay-field {
  color: rgba(42, 82, 62, 0.94);
}

.profile-card.theme-rose .overlay-field {
  color: rgba(116, 57, 78, 0.94);
}

.profile-card.theme-ink .overlay-field {
  color: rgba(26, 27, 27, 0.96);
}

.profile-card.font-serif .overlay-field {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif;
  font-weight: 800;
}

.profile-card.font-sans .overlay-field {
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 700;
}

.profile-card.font-round .overlay-field {
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 700;
}

.profile-card.font-casual .overlay-field {
  font-family: "Klee", "Klee One", "Yuji Syuku", "Hannotate SC", "HanziPen SC", "Tsukushi A Round Gothic", cursive;
  font-weight: 600;
}

.profile-card.spacing-compact .overlay-field {
  padding: 0;
}

.profile-card.spacing-standard .overlay-field {
  padding: max(1px, 0.35cqw);
}

.profile-card.spacing-wide .overlay-field {
  padding: max(2px, 0.7cqw);
}

.overlay-field span {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.icon-overlay {
  top: 7.72%;
  left: 45.3%;
  width: 6.75%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
}

.icon-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name-overlay {
  top: 11.25%;
  left: 55.3%;
  width: 38.1%;
  height: 7.5%;
  font-size: 1.38em;
}

.online-overlay {
  top: 25.15%;
  left: 47.0%;
  width: 21.3%;
  height: 5.6%;
  font-size: 1.06em;
}

.voice-overlay {
  top: 38.45%;
  left: 47.0%;
  width: 21.2%;
  height: 5.5%;
  font-size: 1.06em;
}

.activity-overlay {
  top: 38.45%;
  left: 73.2%;
  width: 21.3%;
  height: 5.5%;
  font-size: 1.02em;
}

.other-overlay {
  top: 51.35%;
  left: 73.2%;
  width: 21.2%;
  height: 8.2%;
  font-size: 0.92em;
}

.comment-overlay {
  top: 67.45%;
  left: 47.0%;
  width: 47.1%;
  height: 21.8%;
  font-size: 1.02em;
  line-height: 1.55;
}

.platform-zone {
  top: 21.0%;
  left: 70.8%;
  width: 24.8%;
  height: 9.8%;
}

.style-zone {
  top: 47.0%;
  left: 45.6%;
  width: 24.0%;
  height: 14.2%;
}

.overlay-check {
  width: 1.38%;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.overlay-check::before,
.overlay-check::after {
  position: absolute;
  content: "";
  opacity: 0;
  transition: opacity 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay-check::before {
  display: none;
}

.overlay-check::after {
  top: -2%;
  left: 25%;
  width: 38%;
  height: 70%;
  border-right: max(1.8px, 0.22cqw) solid rgba(27, 67, 88, 0.95);
  border-bottom: max(1.8px, 0.22cqw) solid rgba(27, 67, 88, 0.95);
  transform: rotate(40deg) scale(0.9);
  transform-origin: center;
}

.overlay-check.is-checked::after {
  opacity: 1;
}

.overlay-check.is-checked::after {
  transform: rotate(40deg) scale(1);
}

.profile-card.theme-azure .overlay-check::after {
  border-color: rgba(26, 84, 108, 0.96);
}

.profile-card.theme-ember .overlay-check::after {
  border-color: rgba(120, 65, 39, 0.96);
}

.profile-card.theme-forest .overlay-check::after {
  border-color: rgba(44, 92, 66, 0.96);
}

.profile-card.theme-rose .overlay-check::after {
  border-color: rgba(130, 58, 82, 0.96);
}

.profile-card.theme-ink .overlay-check::after {
  border-color: rgba(26, 27, 27, 0.96);
}

.check-platform-pc {
  top: 24.67%;
  left: 73.59%;
}

.check-platform-ps {
  top: 24.67%;
  left: 78.53%;
}

.check-platform-ps5 {
  top: 24.67%;
  left: 83.95%;
  display: none;
}

.profile-card.layout-ps5 .check-platform-ps5 {
  display: block;
}

.check-platform-ios {
  top: 24.67%;
  left: 88.87%;
}

.check-platform-android {
  top: 27.88%;
  left: 73.59%;
}

.check-platform-switch {
  top: 27.88%;
  left: 81.50%;
}

.check-style-free {
  top: 51.13%;
  left: 47.26%;
}

.check-style-light {
  top: 51.13%;
  left: 54.23%;
}

.check-style-steady {
  top: 51.13%;
  left: 61.21%;
}

.check-style-heavy {
  top: 54.21%;
  left: 47.26%;
}

.check-style-relaxed {
  top: 54.21%;
  left: 54.23%;
}

.check-style-normal {
  top: 54.21%;
  left: 61.21%;
}

.check-style-gachi {
  top: 57.41%;
  left: 47.26%;
}

.check-style-enjoy {
  top: 57.41%;
  left: 54.23%;
}

.overlay-field:hover,
.overlay-field:focus-visible,
.overlay-field.is-selected,
.icon-overlay:hover,
.icon-overlay:focus-visible,
.icon-overlay.is-selected,
.overlay-zone:hover,
.overlay-zone:focus-visible,
.overlay-zone.is-selected {
  outline: max(2px, 0.22cqw) solid rgba(121, 185, 203, 0.88);
  outline-offset: max(1px, 0.12cqw);
  box-shadow: 0 0 0 max(4px, 0.5cqw) rgba(121, 185, 203, 0.12);
}

.overlay-check:hover,
.overlay-check:focus-visible {
  outline: max(2px, 0.2cqw) solid rgba(121, 185, 203, 0.72);
  outline-offset: max(1px, 0.1cqw);
}

.selected-field {
  display: grid;
  gap: 7px;
  min-height: 78px;
  padding: 14px;
  margin-bottom: 16px;
  background: rgba(11, 15, 18, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.selected-field span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.selected-field strong {
  color: var(--paper);
  font-size: 18px;
  line-height: 1.35;
}

.inline-editor {
  display: grid;
  gap: 14px;
}

.inline-editor .field-group {
  margin: 0;
}

.direct-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.tool-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(11, 15, 18, 0.66);
  border-color: var(--line);
}

.tool-button.primary,
.command-button.primary {
  color: #142027;
  background: linear-gradient(180deg, #e2c784, #caa25a);
  border-color: rgba(255, 255, 255, 0.18);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.command-button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 0 14px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(121, 185, 203, 0.18), rgba(214, 179, 108, 0.08)),
    rgba(11, 15, 18, 0.74);
  border-color: rgba(214, 179, 108, 0.34);
}

.command-button.danger {
  border-color: rgba(184, 102, 95, 0.46);
}

.command-button.danger svg {
  color: #d4938d;
}

.feedback-button {
  grid-column: 1 / -1;
  color: var(--paper-2);
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(121, 185, 203, 0.13), rgba(214, 179, 108, 0.06)),
    rgba(11, 15, 18, 0.62);
}

.command-button svg {
  color: var(--gold);
}

.command-button.primary svg {
  color: #142027;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.generated-output {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  background: rgba(11, 15, 18, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.generated-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--paper-2);
  font-size: 12px;
  font-weight: 900;
}

.generated-head strong {
  color: var(--gold);
  font-weight: 900;
}

.generated-output img {
  width: 100%;
  border: 1px solid rgba(214, 179, 108, 0.32);
  border-radius: 6px;
  background: #101417;
}

.generated-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.luminite-chat {
  position: fixed;
  right: clamp(14px, 3vw, 40px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 40;
  display: grid;
  gap: 12px;
  justify-items: end;
  pointer-events: none;
}

.luminite-chat button,
.luminite-chat a,
.luminite-chat input {
  pointer-events: auto;
}

.luminite-chat-teaser {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(420px, calc(100vw - 32px));
  min-height: 92px;
  padding: 12px 12px 12px 14px;
  color: var(--paper);
  background:
    radial-gradient(circle at 86% 14%, rgba(121, 185, 203, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(20, 34, 48, 0.94), rgba(9, 13, 18, 0.92));
  border: 1px solid rgba(214, 179, 108, 0.56);
  border-radius: 12px;
  box-shadow:
    0 20px 70px rgba(2, 6, 10, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  pointer-events: auto;
  animation: luminiteFloatIn 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.luminite-chat-teaser::before {
  position: absolute;
  inset: 8px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(214, 179, 108, 0.22);
  border-radius: 9px;
}

.luminite-chat-teaser img {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  object-fit: cover;
  background: rgba(11, 15, 18, 0.64);
  border: 1px solid rgba(214, 179, 108, 0.42);
  border-radius: 50%;
}

.luminite-chat-teaser div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.luminite-chat-teaser strong {
  color: var(--paper);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.3;
}

.luminite-chat-teaser span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.luminite-chat-teaser button,
.luminite-chat-fab,
.luminite-chat-head button,
.luminite-chat-form button {
  display: grid;
  place-items: center;
  color: var(--paper);
  background: rgba(11, 15, 18, 0.66);
  border: 1px solid rgba(214, 179, 108, 0.38);
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.luminite-chat-teaser button {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
}

.luminite-chat-teaser button:hover,
.luminite-chat-teaser button:focus-visible,
.luminite-chat-fab:hover,
.luminite-chat-fab:focus-visible,
.luminite-chat-head button:hover,
.luminite-chat-head button:focus-visible,
.luminite-chat-form button:hover,
.luminite-chat-form button:focus-visible,
.luminite-quick-grid button:hover,
.luminite-quick-grid button:focus-visible,
.luminite-chat-action:hover,
.luminite-chat-action:focus-visible {
  color: var(--paper);
  background: rgba(214, 179, 108, 0.14);
  border-color: rgba(214, 179, 108, 0.62);
}

.luminite-chat-teaser button:active,
.luminite-chat-fab:active,
.luminite-chat-head button:active,
.luminite-chat-form button:active,
.luminite-quick-grid button:active,
.luminite-chat-action:active {
  transform: translateY(1px) scale(0.99);
}

.luminite-chat-window {
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) auto auto;
  width: min(430px, calc(100vw - 32px));
  max-height: min(650px, calc(100dvh - 116px));
  color: var(--paper);
  background:
    radial-gradient(circle at 86% 4%, rgba(121, 185, 203, 0.16), transparent 31%),
    linear-gradient(180deg, rgba(20, 31, 43, 0.98), rgba(8, 12, 17, 0.96));
  border: 1px solid rgba(214, 179, 108, 0.62);
  border-radius: 12px;
  box-shadow:
    0 24px 80px rgba(2, 6, 10, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  pointer-events: auto;
  animation: luminitePanelIn 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.luminite-chat-window[hidden],
.luminite-chat-teaser[hidden] {
  display: none;
}

.luminite-chat-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 14px 12px;
  background: rgba(7, 10, 14, 0.54);
  border-bottom: 1px solid var(--line);
}

.luminite-chat-head img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  background: rgba(11, 15, 18, 0.72);
  border: 1px solid rgba(214, 179, 108, 0.42);
  border-radius: 50%;
}

.luminite-chat-head h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.luminite-chat-head span {
  display: block;
  margin-top: 3px;
  color: var(--paper-2);
  font-size: 12px;
  font-weight: 800;
}

.luminite-chat-head button {
  width: 38px;
  height: 38px;
}

.luminite-chat-log {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.luminite-chat-message {
  display: grid;
  gap: 7px;
  max-width: 88%;
  padding: 11px 12px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(238, 225, 196, 0.14);
  border-radius: 12px;
}

.luminite-chat-message.is-bot {
  justify-self: start;
  background:
    linear-gradient(135deg, rgba(121, 185, 203, 0.12), rgba(214, 179, 108, 0.07)),
    rgba(15, 21, 29, 0.76);
}

.luminite-chat-message.is-user {
  justify-self: end;
  color: #151b20;
  background: linear-gradient(180deg, #e2c784, #caa25a);
  border-color: rgba(255, 255, 255, 0.18);
}

.luminite-chat-message p {
  margin: 0;
}

.luminite-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.luminite-chat-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  background: rgba(8, 12, 17, 0.72);
  border: 1px solid rgba(214, 179, 108, 0.34);
  border-radius: 7px;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.luminite-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 12px;
}

.luminite-quick-grid button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 0 11px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  background: rgba(11, 15, 18, 0.58);
  border: 1px solid rgba(214, 179, 108, 0.3);
  border-radius: var(--radius);
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.luminite-quick-grid svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.luminite-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 14px 14px;
  background: rgba(7, 10, 14, 0.42);
  border-top: 1px solid var(--line);
}

.luminite-chat-form input {
  min-height: 44px;
  padding: 0 12px;
  color: var(--paper);
  background: rgba(7, 10, 14, 0.74);
  border-color: rgba(214, 179, 108, 0.32);
}

.luminite-chat-form button {
  width: 44px;
  height: 44px;
}

.luminite-chat-fab {
  display: none !important;
  width: 62px;
  height: 62px;
  color: #eaf7ff;
  background:
    radial-gradient(circle at 50% 48%, rgba(121, 185, 203, 0.28), rgba(11, 15, 18, 0.88) 62%),
    rgba(11, 15, 18, 0.86);
  border-color: rgba(214, 179, 108, 0.68);
  border-radius: 50%;
  box-shadow:
    0 18px 54px rgba(2, 6, 10, 0.48),
    inset 0 0 0 5px rgba(214, 179, 108, 0.1);
}

.luminite-chat-fab svg {
  width: 28px;
  height: 28px;
}

.luminite-chat-fab.is-open {
  background: rgba(214, 179, 108, 0.14);
}

@keyframes luminiteFloatIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes luminitePanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  width: min(360px, calc(100vw - 32px));
  min-height: 46px;
  margin: 0;
  padding: 11px 14px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 800;
  background: rgba(14, 19, 24, 0.94);
  border: 1px solid rgba(214, 179, 108, 0.46);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(2, 6, 10, 0.42);
}

.app-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: center;
  padding: 18px 24px 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  border-top: 1px solid var(--line);
}

.app-footer a,
.static-nav a,
.text-link {
  color: var(--gold);
  text-decoration: none;
}

.app-footer a:hover,
.app-footer a:focus-visible,
.static-nav a:hover,
.static-nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.static-shell {
  width: min(1060px, calc(100% - 32px));
}

.static-header {
  position: relative;
  grid-template-columns: minmax(220px, 1fr) auto;
}

.static-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
  font-size: 13px;
  font-weight: 900;
}

.static-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  padding: 34px;
}

.policy-hero {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.policy-hero h1 {
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: 0;
}

.policy-hero p,
.legal-section p,
.step-list p {
  max-width: 78ch;
  margin: 0;
  color: var(--paper-2);
}

.legal-layout {
  display: grid;
  gap: 18px;
}

.legal-section {
  display: grid;
  gap: 10px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    rgba(17, 24, 32, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal-section h2,
.step-list h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

.updated-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.step-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: how-to-step;
}

.step-list li {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 92px;
  padding: 20px 20px 20px 72px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    rgba(17, 24, 32, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: how-to-step;
}

.step-list li::before {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #12171a;
  font-weight: 900;
  content: counter(how-to-step);
  background: var(--gold);
  border-radius: 50%;
}

.support-section {
  border-color: rgba(121, 185, 203, 0.3);
}

@media (max-width: 1060px) {
  .app-shell {
    width: min(760px, calc(100% - 24px));
  }

  .app-header {
    grid-template-columns: 1fr;
  }

  .static-header {
    grid-template-columns: 1fr;
  }

  .static-nav {
    justify-content: flex-start;
  }

  .header-actions {
    position: absolute;
    top: 16px;
    right: 18px;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-stage,
  .panel {
    grid-column: 1;
    grid-row: auto;
  }

  .card-stage {
    position: relative;
    top: auto;
  }

  .screen-edit .card-stage,
  .screen-direct .card-stage,
  .screen-preview .card-stage {
    display: grid;
  }
}

@media (max-width: 620px) {
  body {
    background: #0f171f;
  }

  .app-shell {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .app-shell::before,
  .app-shell::after {
    display: none;
  }

  .app-header {
    min-height: auto;
    max-width: 100vw;
    padding: 12px;
    overflow: hidden;
  }

  .brand {
    width: min(270px, calc(100vw - 112px));
  }

  .brand-logo {
    max-height: 42px;
  }

  .header-actions {
    top: 10px;
    right: 12px;
  }

  .icon-action {
    width: 36px;
    height: 36px;
  }

  .mode-switch {
    min-width: 0;
    width: 100%;
    max-width: calc(100vw - 24px);
  }

  .mode-button {
    min-height: 40px;
    padding: 0 8px;
    font-size: 12px;
  }

  .mode-button svg {
    display: none;
  }

  .workspace {
    max-width: 100vw;
    padding: 10px 12px 12px;
    overflow: hidden;
  }

  .ad-slot {
    padding: 10px 12px 0;
  }

  .ad-frame {
    min-height: 96px;
  }

  .ad-slot-card-bottom {
    display: none;
  }

  .panel {
    width: 100%;
    max-width: calc(100vw - 24px);
    padding: 16px;
  }

  .panel-head h1,
  .panel-head h2 {
    font-size: 22px;
  }

  .card-viewport {
    min-height: auto;
    width: 100%;
    padding: 0;
  }

  .profile-card {
    width: 100%;
    gap: 0;
    padding: 0;
    font-size: 8px;
  }

  .profile-card.size-large {
    font-size: 9px;
  }

  .profile-card.size-xlarge {
    font-size: 10px;
  }

  .profile-card.size-small {
    font-size: 7px;
  }

  .profile-card.spacing-wide {
    padding: 0;
    gap: 0;
  }

  .name-avatar {
    width: 30px;
    height: 30px;
  }

  .name-card {
    min-height: 48px;
    padding: 6px 8px;
  }

  .info-board {
    gap: 5px;
  }

  .info-grid {
    gap: 5px;
  }

  .field-card {
    min-height: 50px;
    padding: 5px 6px;
  }

  .comment-card {
    min-height: 64px;
    padding: 6px;
  }

  .check-grid,
  .style-grid,
  .action-grid,
  .settings-grid,
  .generated-actions,
  .direct-tools {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    gap: 10px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }

  .luminite-chat {
    right: 0;
    bottom: 0;
    width: 100%;
    gap: 10px;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom));
  }

  .luminite-chat-teaser {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    width: min(100%, 390px);
    min-height: 72px;
    padding: 10px;
  }

  .luminite-chat-teaser img {
    width: 46px;
    height: 46px;
  }

  .luminite-chat-teaser strong {
    font-size: 14px;
  }

  .luminite-chat-teaser span {
    font-size: 11px;
  }

  .luminite-chat-teaser button {
    width: 36px;
    height: 36px;
  }

  .luminite-chat-window {
    width: 100%;
    max-height: min(78dvh, 650px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
  }

  .luminite-chat-head {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    padding: 12px;
  }

  .luminite-chat-head img {
    width: 46px;
    height: 46px;
  }

  .luminite-chat-log {
    padding: 12px;
  }

  .luminite-chat-message {
    max-width: 94%;
    font-size: 12px;
  }

  .luminite-quick-grid {
    padding: 0 12px 10px;
  }

  .luminite-quick-grid button {
    min-height: 44px;
    font-size: 12px;
  }

  .luminite-chat-form {
    padding: 10px 12px 12px;
  }

  .luminite-chat-fab {
    width: 56px;
    height: 56px;
  }

  .app-footer {
    justify-content: flex-start;
    padding: 16px 12px 100px;
  }

  .static-shell {
    width: 100%;
  }

  .static-content {
    padding: 22px 12px;
  }

  .policy-hero h1 {
    font-size: 28px;
  }

  .legal-section {
    padding: 16px;
  }

  .step-list li {
    min-height: auto;
    padding: 16px 16px 16px 62px;
  }

  .step-list li::before {
    top: 16px;
    left: 16px;
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
