.gc-editor, .gc-popup {
  --gc-ink:#163543;
  --gc-ocean:#065c7a;
  --gc-rule:#b6ced0;
  --gc-shadow:0 3px 0 #1a4b5430;
  color:var(--gc-ink);
  font-family:var(--ui-font, "Inter", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif);
}
.gc-editor *, .gc-popup *, .gc-card, .gc-card * {box-sizing:border-box}
.gc-editor {
  display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;
  height:clamp(230px,75dvh,840px);max-height:100%;min-height:0;
  width:100%;min-width:0;position:relative;text-align:start;
}
.view-host>.gc-editor {width:min(100%,1440px);height:100%;flex:1 1 0;align-self:center;padding:clamp(6px,1.25vw,17px)}
.gc-editor h3,.gc-popup h2 {margin:0;line-height:1.15}
.gc-editor button,.gc-popup button {font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.gc-editor button:disabled,.gc-popup button:disabled {cursor:default}
.gc-editor button:focus-visible,.gc-editor [tabindex]:focus-visible,.gc-popup input:focus-visible {
  outline:3px solid #007a9a;outline-offset:2px;
}
.gc-editor-header, .gc-toolbar, .gc-history, .gc-tool-buttons {display:flex;align-items:center}
.gc-editor-header {gap:8px}
.gc-history {gap:5px;margin-inline-start:auto}
.gc-editor .gc-btn, .gc-popup .gc-btn {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:8px 10px;
  min-width:38px;min-height:37px;border:1.5px solid var(--gc-rule);border-radius:10px;
  color:var(--gc-ink);background:#fffdf7;font-size:.85rem;font-weight:760;line-height:1.12;
  box-shadow:0 2px 0 #14323715;white-space:nowrap;
}
.gc-editor .gc-btn:hover:enabled,.gc-popup .gc-btn:hover:enabled {border-color:var(--gc-ocean);background:#e6f5f3}
.gc-editor .gc-btn:active:enabled,.gc-popup .gc-btn:active:enabled {transform:translateY(1px);box-shadow:none}
.gc-editor .gc-btn:disabled {background:#f7f7f1;color:#72848b;opacity:.58;box-shadow:none}
.gc-btn>svg {width:20px;height:20px;flex:none}
.gc-editor .gc-template-trigger {background:#ffdf77;border-color:#d4a138;color:#443615}
.gc-template-trigger>svg:last-child {width:13px}
.gc-editor-body {
  display:grid;grid-template-columns:clamp(140px,19%,235px) minmax(0,1fr);gap:12px;min-height:0;min-width:0;
}
.gc-tray {
  display:flex;flex-direction:column;gap:10px;min-height:0;overflow:hidden;
  background:#fffdf5;border:1.5px solid var(--gc-rule);border-radius:15px;padding:12px;box-shadow:var(--gc-shadow);
}
.gc-tray h3 {font-size:clamp(15px,1.6vw,20px);color:var(--gc-ink)}
.gc-inventory {
  flex:1 1 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,78px),1fr));
  align-content:start;grid-auto-rows:min-content;gap:6px;overflow:auto;overscroll-behavior:contain;
  min-height:0;scrollbar-width:thin;padding:3px;
}
.gc-inventory .gc-tile {
  position:relative;display:grid;grid-template-rows:34px auto;justify-items:center;align-content:center;
  gap:4px;min-height:70px;min-width:0;margin:0;padding:6px 2px;border:1px solid #d2dcda;
  border-radius:9px;background:#fff;color:var(--gc-ink);box-shadow:0 2px 0 #1b454514;
}
.gc-inventory .gc-tile:hover:enabled {background:#f4faf6;border-color:var(--gc-ocean)}
.gc-inventory .gc-tile:disabled {opacity:.48;box-shadow:none}
.gc-cutout {display:block;pointer-events:none;width:100%;height:100%;overflow:visible}
.gc-tile>.gc-cutout {width:34px;height:34px}
.gc-count {
  position:absolute;inset:4px 4px auto auto;background:#f7edcb;border-radius:5px;
  padding:1px 3px;font:700 10px/1.2 Arial,sans-serif;color:#493921;
}
.gc-tile-name {font-family:NH,"NH Handwriting",Arial,sans-serif;font-size:clamp(10px,.95vw,13px);line-height:1.08;overflow-wrap:normal}
.gc-empty {grid-column:1/-1;margin:0;font-size:clamp(12px,1.3vw,16px);line-height:1.5;color:#4c6269}
.gc-editor .gc-shop,.gc-popup .gc-done {background:var(--gc-ocean);border-color:var(--gc-ocean);color:white}
.gc-editor .gc-shop:hover:enabled,.gc-popup .gc-done:hover:enabled {background:#084962;color:#fff}
.gc-surface {
  display:grid;place-items:center;container-type:size;min-width:0;min-height:0;
  padding:12px;border:1.5px solid #a5c7c8;border-radius:16px;
  background-color:#deeeea;
  background-image:radial-gradient(#a6c2bd 1px,transparent 1px);
  background-size:13px 13px;
}
.gc-card {
  --gc-card-ratio:1.5;position:relative;isolation:isolate;container-type:inline-size;
  width:100%;aspect-ratio:var(--gc-card-ratio);overflow:hidden;
  color:#71372d;background:#fff9ed;line-height:1;direction:ltr;text-align:center;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.gc-surface>.gc-card {
  width:min(100cqw,calc(100cqh * var(--gc-card-ratio)));
  box-shadow:0 2px 3px #28424438,0 9px 18px #27463d33;
  border-radius:2px;user-select:none;-webkit-user-select:none;touch-action:none;
}
.gc-paper,.gc-pieces {position:absolute;inset:0;width:100%;height:100%;display:block;margin:0}
.gc-paper {object-fit:fill;pointer-events:none;max-width:none}
.gc-greeting {
  position:absolute;top:5%;left:7%;right:7%;color:#894035;
  font-family:Georgia,"Times New Roman",serif;font-weight:700;font-style:italic;
  font-size:6cqw;letter-spacing:-.035em;line-height:1.08;pointer-events:none;
}
.gc-card[data-template="christmas"] .gc-greeting {color:#22593f}
.gc-card[data-template="valentine"] .gc-greeting {color:#a44460}
.gc-card[data-template="newyear"] .gc-greeting {color:#9b4c22}
.gc-card[data-template="thanks"] .gc-greeting {color:#356566}
.gc-signature {
  position:absolute;bottom:5%;left:10%;right:10%;display:flex;align-items:end;
  justify-content:space-between;gap:4%;pointer-events:none;color:#283f42;
  font:600 2.65cqw/1.12 var(--gc-hand, NH, "NH Handwriting", "Arial Rounded MT Bold", Arial, sans-serif);text-align:left;
}
.gc-signature>span {min-width:0;max-width:48%;overflow-wrap:anywhere;unicode-bidi:plaintext}
.gc-signature>span:last-child:not(:first-child) {text-align:right}
.gc-pieces {pointer-events:none}
.gc-stamp {
  position:absolute;display:block;aspect-ratio:1;transform:translate(-50%,-50%) rotate(var(--gc-rotation,0deg));transform-origin:center;
  box-sizing:border-box;padding:0;margin:0;border:0;background:transparent;border-radius:0;box-shadow:none;
}
.gc-stamp>.gc-cutout {filter:drop-shadow(0 .1cqw .06cqw #473a2e29)}
/* Only the paper shape receives hits. Empty corners leave overlapped pieces reachable. */
.gc-interactive .gc-stamp {pointer-events:none;touch-action:none}
.gc-interactive .gc-stamp>.gc-cutout>* {pointer-events:visiblePainted;cursor:grab}
.gc-interactive .gc-stamp>.gc-cutout>*:active {cursor:grabbing}
.gc-stamp.gc-picked::after {content:"";position:absolute;inset:-2px;border:1.5px dashed #175d7a;pointer-events:none}
.gc-handle {
  display:none;position:absolute;z-index:1;width:clamp(21px,3.1cqw,28px);height:clamp(21px,3.1cqw,28px);
  border:1.5px solid #175d7a;border-radius:50%;background:#fffef8;color:#175d7a;
  align-items:center;justify-content:center;touch-action:none;box-shadow:0 1px 2px #1d484f33;
}
.gc-picked .gc-handle {display:flex;pointer-events:auto}
.gc-handle>svg {width:70%;height:70%;pointer-events:none}
.gc-rotate {top:0;left:0;transform:translate(-52%,-52%);cursor:crosshair}
.gc-resize {right:0;bottom:0;transform:translate(52%,52%);cursor:nwse-resize}
.gc-toolbar {
  justify-content:center;gap:clamp(8px,2.5vw,24px);padding:6px 10px 5px;
  background:#fffdf7;border:1.5px solid var(--gc-rule);border-radius:12px;
}
.gc-tool-group {display:grid;gap:3px;justify-items:center}
.gc-tool-buttons {gap:3px}
.gc-editor .gc-tool-buttons .gc-btn {min-width:38px;min-height:31px;padding:4px 7px;border-radius:7px}
.gc-tool-label {font-size:11px;font-weight:720;line-height:1.1;color:#4b626a}
.gc-sr {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.gc-popup {
  padding:0;border:none;border-radius:19px;background:#fffaf0;width:min(480px,93vw);
  max-height:92dvh;overflow:auto;box-shadow:0 24px 64px #153b4752;
}
.gc-popup::backdrop {background:#122e3a77}
.gc-pop-content {position:relative;padding:clamp(18px,3vw,26px)}
.gc-popup h2 {padding-inline-end:40px;margin-bottom:18px;font-size:clamp(19px,2.5vw,26px)}
.gc-popup .gc-pop-close {position:absolute;right:12px;top:12px;min-height:31px;min-width:31px;padding:5px}
.gc-choices {display:grid;grid-template-columns:1fr 1fr;gap:10px}
.gc-popup button.gc-choice {overflow:hidden;padding:5px;border:2px solid #cfdbd7;border-radius:10px;background:white;color:var(--gc-ink)}
.gc-popup button.gc-choice[aria-pressed="true"] {border-color:#087f91;background:#edf8f5}
.gc-choice-label {display:block;padding:7px 0 3px;text-align:center;font-weight:700;font-size:14px}
.gc-name-form {display:grid;gap:14px}
.gc-name-form label {display:grid;gap:5px;font-weight:700}
.gc-name-form input {width:100%;padding:9px 10px;border:1.5px solid var(--gc-rule);border-radius:8px;font:inherit;background:white;color:var(--gc-ink)}
.gc-name-form .gc-done {justify-self:end;min-width:84px}
@media(max-width:650px) and (min-height:551px) {
  .gc-editor {height:min(76dvh,740px);gap:7px}
  .gc-editor-body {grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:7px}
  .gc-surface {grid-row:1;padding:8px}
  .gc-tray {display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:3px 8px;padding:6px 9px}
  .gc-tray h3 {grid-column:1;font-size:13px}
  .gc-inventory {display:flex;align-items:center;gap:5px;grid-row:2;grid-column:1/-1;padding:1px;min-height:35px}
  .gc-inventory .gc-tile {flex:0 0 78px;grid-template-rows:24px auto;min-height:49px;gap:2px;padding:3px}
  .gc-tile>.gc-cutout {width:24px;height:24px}
  .gc-tray .gc-shop {grid-column:2;grid-row:1;min-height:24px;min-width:0;font-size:11px;padding:3px 6px;border-radius:6px}
  .gc-shop>svg {width:14px;height:14px}
  .gc-editor .gc-btn {font-size:12px;min-height:32px;padding:5px 6px}
  .gc-toolbar {gap:10px;padding:4px}
  .gc-editor .gc-tool-buttons .gc-btn {min-width:30px;min-height:29px;padding:4px}
}
@media(max-width:650px) and (min-height:650px) {
  .gc-editor-body {grid-template-rows:minmax(0,1fr) minmax(98px,.52fr)}
  .gc-tray {grid-template-rows:auto minmax(0,1fr);padding:7px 10px;gap:5px}
  .gc-inventory {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,74px),1fr));grid-auto-rows:min-content;align-items:stretch;align-content:start;gap:5px;overflow:auto}
  .gc-inventory .gc-tile {grid-template-rows:30px auto;min-height:55px;padding:4px 2px}
  .gc-tile>.gc-cutout {width:30px;height:30px}
  .gc-editor .gc-tool-buttons .gc-btn {min-width:36px;min-height:36px}
}
@media(max-height:550px) {
  .gc-editor {height:72dvh;gap:4px}
  .gc-editor-body {grid-template-columns:clamp(102px,20%,180px) minmax(0,1fr);gap:6px}
  .gc-editor-header {gap:4px}
  .gc-editor .gc-btn {min-height:27px;min-width:29px;padding:3px 6px;font-size:12px}
  .gc-surface,.gc-tray {padding:6px;border-radius:9px}
  .gc-tray {gap:4px}
  .gc-tray h3 {font-size:14px}
  .gc-toolbar {gap:16px;padding:3px}
  .gc-tool-group {display:flex;align-items:center;gap:4px}
  .gc-editor .gc-tool-buttons .gc-btn {min-height:24px;min-width:27px;padding:2px 4px}
  .gc-btn>svg {width:16px;height:16px}
}
@media(max-height:550px) and (max-width:550px) {
  .gc-tool-group {display:grid}
  .gc-toolbar {gap:6px}
}
@media print {
  .gc-card {break-inside:avoid;page-break-inside:avoid}
  .gc-handle,.gc-stamp.gc-picked::after {display:none!important}
  .gc-stamp,.gc-card {outline:none!important}
  .gc-surface>.gc-card {box-shadow:none}
}
