.paint-page {
  width: min(100% - 24px, 1540px);
  padding-block: 32px 84px;
}

.paint-intro { --accent: var(--fmf-mint); margin-bottom: 22px; }
.paint-intro__chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.paint-intro__chips span { border: 1px solid color-mix(in srgb, var(--fmf-mint) 35%, #d8e2ef); background: color-mix(in srgb, var(--fmf-mint) 10%, white); color: var(--fmf-navy); border-radius: 999px; padding: 6px 10px; font-size: .82rem; font-weight: 700; }

.paint-app { margin-block: 22px 44px; }
.paint-window { --paint-chrome: #eceff3; --paint-chrome-2: #d8dee7; --paint-line: #adb7c5; --paint-dark: #3e4a5b; --paint-workspace: #77808d; background: var(--paint-chrome); border: 1px solid #8c97a7; border-radius: 12px; overflow: hidden; box-shadow: 0 18px 42px rgba(28, 44, 72, .16); color: #1d2736; user-select: none; }
.paint-window button, .paint-window select, .paint-window input, .paint-window textarea { font: inherit; }
.paint-window button { color: inherit; }

.paint-titlebar { min-height: 34px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 5px 10px; color: white; background: linear-gradient(90deg, #1c3c7a, #2d79ae 58%, #35adad); font-size: .88rem; }
.paint-titlebar__brand { display: flex; gap: 4px; }
.paint-titlebar__brand span { width: 8px; height: 8px; border-radius: 2px; background: rgba(255,255,255,.9); }
.paint-titlebar__brand span:nth-child(2) { opacity: .7; }
.paint-titlebar__brand span:nth-child(3) { opacity: .45; }
.paint-titlebar__meta { font-size: .78rem; opacity: .88; }

.paint-menubar { min-height: 34px; display: flex; align-items: stretch; padding: 0 5px; border-bottom: 1px solid var(--paint-line); background: #f7f8fa; position: relative; z-index: 20; }
.paint-menu { position: relative; }
.paint-menu > button { height: 33px; border: 0; background: transparent; padding: 0 10px; cursor: pointer; border-radius: 4px; }
.paint-menu > button:hover, .paint-menu > button[aria-expanded="true"] { background: #dfe8f2; }
.paint-menu__panel { position: absolute; top: calc(100% - 2px); left: 0; width: 250px; padding: 5px; background: #fff; border: 1px solid #8e99a7; box-shadow: 4px 7px 16px rgba(24,34,48,.22); border-radius: 5px; z-index: 60; }
.paint-menu__panel--right { left: auto; right: 0; }
.paint-menu__panel button { width: 100%; min-height: 32px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; text-align: left; border: 0; border-radius: 3px; background: transparent; padding: 4px 8px; cursor: pointer; }
.paint-menu__panel button:hover, .paint-menu__panel button:focus-visible { background: #dcecf8; outline: none; }
.paint-menu__panel button:disabled { opacity: .45; cursor: default; }
.paint-menu__panel hr { height: 1px; border: 0; background: #d7dde5; margin: 4px; }
.paint-menu__panel kbd { color: #687487; font-size: .75rem; font-family: inherit; }

.paint-commandbar { min-height: 42px; display: flex; align-items: center; gap: 4px; padding: 4px 7px; border-bottom: 1px solid var(--paint-line); background: linear-gradient(#f4f6f8,#e4e8ed); overflow-x: auto; scrollbar-width: thin; }
.paint-quick { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 4px; background: transparent; padding: 3px 8px; white-space: nowrap; cursor: pointer; }
.paint-quick:hover { border-color: #aab6c5; background: #fff; }
.paint-quick:active { background: #dce6f0; }
.paint-quick--icon { min-width: 32px; justify-content: center; padding-inline: 7px; font-size: 1.15rem; }
.paint-commandbar__divider { width: 1px; height: 25px; background: #b7c0cb; margin-inline: 3px; flex: 0 0 auto; }
.paint-commandbar__spacer { flex: 1 1 auto; min-width: 8px; }
.paint-zoom-label { min-width: 48px; text-align: center; font-size: .78rem; color: #4d5969; }
.paint-local-badge { flex: 0 0 auto; border: 1px solid #94cbb9; color: #1d6d51; background: #edf9f4; padding: 5px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; }

.paint-body { display: grid; grid-template-columns: 72px minmax(0, 1fr) 222px; min-height: 600px; }
.paint-toolbox { padding: 6px; display: grid; grid-template-columns: repeat(2, 1fr); align-content: start; gap: 4px; border-right: 1px solid var(--paint-line); background: #e3e7ec; }
.paint-tool { aspect-ratio: 1; min-width: 0; border: 1px solid #a9b3c0; border-radius: 3px; background: linear-gradient(#fff,#e7ebef); display: grid; place-items: center; cursor: pointer; padding: 4px; position: relative; }
.paint-tool:hover { background: #fff; border-color: #6f8298; }
.paint-tool.is-active { background: #c8e5f7; border-color: #4687ad; box-shadow: inset 0 0 0 1px #fff; }
.paint-tool svg { width: 21px; height: 21px; fill: none; stroke: #27384a; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.paint-tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.paint-center { min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; background: var(--paint-chrome); }
.paint-options { min-height: 48px; display: flex; align-items: center; gap: 14px; padding: 5px 9px; border-bottom: 1px solid var(--paint-line); background: #eef1f5; overflow-x: auto; }
.paint-options__group { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.paint-options label { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: #4b596b; }
.paint-options select, .paint-options input:not([type="checkbox"]), .paint-options textarea { border: 1px solid #aeb8c4; border-radius: 4px; background: white; min-height: 30px; }
.paint-options select { padding: 3px 25px 3px 7px; }
.paint-options input[type="range"] { width: 100px; min-height: 0; }
.paint-options__hint { margin-left: auto; min-width: 170px; max-width: 370px; font-size: .74rem; color: #647184; text-align: right; }
.paint-text-entry textarea { width: 190px; padding: 5px 7px; resize: vertical; }
.paint-check { white-space: nowrap; }
.paint-check input { margin: 0; }

.paint-stage { min-width: 0; min-height: 460px; overflow: auto; background-color: var(--paint-workspace); background-image: linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.08) 75%), linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.08) 75%); background-size: 22px 22px; background-position: 0 0,11px 11px; padding: 28px; outline: none; touch-action: pan-x pan-y; }
.paint-stage:focus-visible { box-shadow: inset 0 0 0 3px rgba(48,128,230,.45); }
.paint-canvas-wrap { position: relative; width: 900px; height: 600px; margin: 0 auto; transform-origin: top left; box-shadow: 0 0 0 1px #333, 5px 7px 16px rgba(0,0,0,.28); background-image: linear-gradient(45deg,#d9d9d9 25%,transparent 25%),linear-gradient(-45deg,#d9d9d9 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d9d9d9 75%),linear-gradient(-45deg,transparent 75%,#d9d9d9 75%); background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; }
.paint-canvas, .paint-overlay { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; }
.paint-canvas { background: transparent; touch-action: none; }
.paint-overlay { pointer-events: none; }
.paint-canvas-wrap.is-pixelated .paint-canvas, .paint-canvas-wrap.is-pixelated .paint-overlay { image-rendering: pixelated; }
.paint-canvas-wrap.show-grid .paint-overlay { }

.paint-palettebar { min-height: 60px; display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-top: 1px solid var(--paint-line); background: #e8ebef; overflow-x: auto; }
.paint-current-colors { width: 54px; height: 42px; position: relative; flex: 0 0 auto; }
.paint-color-chip { width: 30px; height: 30px; border: 2px solid #fff; box-shadow: 0 0 0 1px #636d7b; position: absolute; cursor: pointer; border-radius: 2px; }
.paint-color-chip--secondary { right: 1px; bottom: 1px; background: #fff; }
.paint-color-chip--primary { left: 1px; top: 1px; background: #000; }
.paint-palette { display: grid; grid-template-rows: repeat(2, 20px); grid-auto-flow: column; grid-auto-columns: 20px; gap: 2px; flex: 0 0 auto; }
.paint-palette button { width: 20px; height: 20px; border: 1px solid #5d6673; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.paint-palette button:hover { outline: 2px solid #276da0; outline-offset: 1px; }
.paint-edit-color { min-height: 36px; border: 1px solid #a7b1be; border-radius: 4px; background: linear-gradient(#fff,#e2e7ec); padding: 4px 9px; cursor: pointer; white-space: nowrap; }

.paint-layers { min-width: 0; border-left: 1px solid var(--paint-line); background: #e7eaee; display: flex; flex-direction: column; }
.paint-layers__header { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; background: #dbe0e6; border-bottom: 1px solid var(--paint-line); }
.paint-layers__header span { font-size: .72rem; color: #667284; }
.paint-layer-list { min-height: 180px; max-height: 390px; overflow: auto; padding: 7px; display: flex; flex-direction: column; gap: 5px; }
.paint-layer { display: grid; grid-template-columns: auto 42px minmax(0,1fr); gap: 6px; align-items: center; min-height: 54px; padding: 5px; border: 1px solid #adb7c4; border-radius: 4px; background: #f8f9fb; cursor: pointer; }
.paint-layer.is-active { border-color: #3a85b5; background: #dceefa; box-shadow: inset 0 0 0 1px white; }
.paint-layer__visibility { width: 28px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; font-size: 1rem; }
.paint-layer__thumb { width: 42px; height: 36px; border: 1px solid #9ba6b4; background: white; object-fit: contain; image-rendering: auto; }
.paint-layer__text { min-width: 0; }
.paint-layer__text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.paint-layer__text small { display: block; color: #728094; font-size: .67rem; margin-top: 2px; }
.paint-layer-controls { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; padding: 6px; border-top: 1px solid #bdc5d0; }
.paint-layer-controls button { min-height: 31px; border: 1px solid #aab4c0; border-radius: 3px; background: linear-gradient(#fff,#e3e7ec); cursor: pointer; }
.paint-layer-controls button:hover { background: white; }
.paint-opacity { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; padding: 7px 9px; font-size: .72rem; font-weight: 700; }
.paint-opacity input { min-width: 0; }
.paint-opacity output { min-width: 35px; text-align: right; }
.paint-layers__tip { padding: 0 9px 9px; color: #687487; font-size: .69rem; line-height: 1.35; margin: auto 0 0; }

.paint-statusbar { min-height: 27px; display: flex; gap: 12px; align-items: center; padding: 3px 8px; border-top: 1px solid #aeb7c3; background: #e4e8ed; color: #4e5a6b; font-size: .7rem; }
.paint-statusbar > span:not(.paint-statusbar__spacer) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paint-statusbar__spacer { flex: 1; }

.paint-dialog { width: min(92vw, 460px); border: 1px solid #7f8996; border-radius: 9px; padding: 0; box-shadow: 0 18px 55px rgba(0,0,0,.3); color: #263346; }
.paint-dialog::backdrop { background: rgba(16,32,64,.42); }
.paint-dialog form > header { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: linear-gradient(90deg,#173e79,#2f8ba5); color: white; }
.paint-dialog h2 { font-size: 1.05rem; margin: 0; }
.paint-dialog form > header button { width: 32px; height: 32px; border: 0; background: rgba(255,255,255,.14); color: white; border-radius: 4px; cursor: pointer; font-size: 1.3rem; }
.paint-dialog__body { padding: 18px; display: grid; gap: 13px; background: #f7f8fa; }
.paint-dialog__body > label:not(.paint-check) { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-weight: 700; }
.paint-dialog__body input[type="number"] { width: 110px; min-height: 40px; padding: 5px 8px; border: 1px solid #acb6c3; border-radius: 5px; }
.paint-dialog__body select { min-height: 40px; min-width: 180px; padding: 5px 8px; border: 1px solid #acb6c3; border-radius: 5px; background: white; }
.paint-dialog__body p { color: #687487; margin: 0; font-size: .88rem; }
.paint-dialog form > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 11px 14px; background: #eef1f4; border-top: 1px solid #d2d8e0; }
.paint-dialog .button { min-height: 40px; padding-inline: 16px; }
.paint-dialog--help { width: min(92vw, 640px); }
.paint-dialog--help .paint-dialog__body { max-height: 60vh; overflow: auto; }
.paint-dialog--help ul { margin: 0; padding-left: 20px; }
.paint-dialog--help li + li { margin-top: 7px; }
.paint-shortcut-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; }
.paint-shortcut-grid kbd { font-family: inherit; font-weight: 700; padding: 3px 6px; border: 1px solid #adb7c3; border-radius: 4px; background: white; }

.paint-seo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 42px 0 20px; }
.paint-seo-grid article, .paint-feature-copy { background: white; border: 1px solid var(--fmf-border); border-radius: var(--radius); padding: clamp(24px,4vw,36px); }
.paint-seo-grid h2, .paint-feature-copy h2 { color: var(--fmf-navy); margin: .1em 0 .4em; font-size: clamp(1.45rem,2.4vw,2rem); letter-spacing: -.025em; }
.paint-seo-grid p, .paint-feature-copy p { color: var(--fmf-muted); line-height: 1.7; }
.paint-seo-grid a { font-weight: 700; color: #246eb0; }
.paint-feature-copy { margin-bottom: 30px; }
.paint-feature-copy__columns { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 22px; }
.paint-feature-copy__columns div { border-left: 4px solid color-mix(in srgb,var(--fmf-mint) 68%,var(--fmf-blue)); padding: 4px 0 4px 14px; }
.paint-feature-copy__columns strong { color: var(--fmf-navy); }
.paint-feature-copy__columns p { margin: 6px 0 0; font-size: .9rem; }
.paint-trademark-note { border-top: 1px solid var(--fmf-border); margin-top: 26px !important; padding-top: 18px; font-size: .78rem; }

@media (max-width: 1199px) {
  .paint-body { grid-template-columns: 72px minmax(0,1fr); }
  .paint-layers { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--paint-line); }
  .paint-layer-list { max-height: 185px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-flow: row; }
  .paint-layer { grid-template-columns: auto 42px minmax(0,1fr); }
  .paint-layers__tip { margin-top: 0; }
  .paint-feature-copy__columns { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 767px) {
  .paint-page { width: min(100% - 12px, 1540px); padding-top: 18px; }
  .paint-intro { padding: 22px 18px; }
  .paint-titlebar { grid-template-columns: auto minmax(0,1fr); }
  .paint-titlebar__meta { display: none; }
  .paint-menubar { overflow-x: auto; }
  .paint-menu__panel { position: fixed; left: 12px; right: 12px; top: auto; width: auto; max-height: 65vh; overflow: auto; }
  .paint-commandbar .paint-quick span:last-child { display: none; }
  .paint-local-badge { display: none; }
  .paint-body { display: flex; flex-direction: column; min-height: 0; }
  .paint-toolbox { border-right: 0; border-bottom: 1px solid var(--paint-line); grid-template-columns: repeat(15,42px); grid-template-rows: 42px; overflow-x: auto; padding: 5px; }
  .paint-tool { width: 42px; height: 42px; aspect-ratio: auto; }
  .paint-options { min-height: 52px; }
  .paint-options__hint { display: none; }
  .paint-stage { min-height: 390px; padding: 20px; }
  .paint-palettebar { min-height: 56px; }
  .paint-layers { max-height: 270px; }
  .paint-layer-list { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 150px; }
  .paint-statusbar [data-status-dimensions], .paint-statusbar [data-status-layer] { display: none; }
  .paint-seo-grid, .paint-feature-copy__columns { grid-template-columns: 1fr; }
  .paint-dialog__body > label:not(.paint-check) { align-items: stretch; flex-direction: column; gap: 6px; }
  .paint-dialog__body input[type="number"], .paint-dialog__body select { width: 100%; min-width: 0; }
}

@media (max-width: 460px) {
  .paint-layer-list { grid-template-columns: 1fr; }
  .paint-palette { grid-template-rows: repeat(2,18px); grid-auto-columns: 18px; }
  .paint-palette button { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .paint-window *, .paint-window *::before, .paint-window *::after { transition: none !important; animation: none !important; }
}


/* v1.0.1 — true fullscreen workspace */
body.five-min-paint-pseudo-fullscreen { overflow: hidden !important; }
.paint-app.is-fullscreen-active {
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
  background: #d8dee7;
  overflow: hidden;
}
.paint-app.is-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  width: 100vw;
  height: 100vh;
}
.paint-app.is-fullscreen-active .paint-window {
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.paint-app.is-fullscreen-active .paint-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.paint-app.is-fullscreen-active .paint-center,
.paint-app.is-fullscreen-active .paint-layers {
  min-height: 0;
}
.paint-app.is-fullscreen-active .paint-stage {
  min-height: 0 !important;
  height: auto;
}
.paint-app.is-fullscreen-active .paint-layer-list {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
}
.paint-app.is-fullscreen-active .paint-statusbar,
.paint-app.is-fullscreen-active .paint-titlebar,
.paint-app.is-fullscreen-active .paint-menubar,
.paint-app.is-fullscreen-active .paint-commandbar,
.paint-app.is-fullscreen-active .paint-options,
.paint-app.is-fullscreen-active .paint-palettebar {
  flex: 0 0 auto;
}
.paint-quick--fullscreen[aria-pressed="true"] {
  border-color: #5a8eaf;
  background: #d9edf8;
}
.paint-app:fullscreen,
.paint-app:-webkit-full-screen {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #d8dee7;
}

@media (max-width: 767px) {
  .paint-app.is-fullscreen-active .paint-body { min-height: 0; }
  .paint-app.is-fullscreen-active .paint-stage { min-height: 0 !important; flex: 1 1 auto; }
  .paint-app.is-fullscreen-active .paint-layers { max-height: 34%; }
}
