/* ─────────────────────────────────────────────
   MY CAFE-TERIA · 픽셀 카페 스타일
   레이아웃: 1024px 이상 2열(제조대 | 재료 선반), 그 아래는 1열
   ───────────────────────────────────────────── */
:root {
  --ink: #3b2a20;
  --paper: #fff8ec;
  --cream: #fdf0d8;
  --wall-a: #f8e7c8;
  --wall-b: #f3dfbb;
  --wood: #9b6a43;
  --wood-dark: #6b4226;
  --red: #e06666;
  --mint: #7cc6a4;
  --yellow: #ffd166;
  --muted: #8a7260;
  --px: 4px;           /* 픽셀 테두리 두께 */
  --gap: 20px;         /* 패널 사이 간격 */
  --pad: 16px;         /* 패널 안쪽 여백 */
  --maxw: 1100px;
  --font: 'Galmuri11', 'Galmuri9', 'NeoDunggeunmo', ui-monospace, monospace;
  --mono: 'GalmuriMono11', 'Galmuri11', ui-monospace, monospace;
}
@media (max-width: 599px) {
  :root { --px: 3px; --gap: 16px; --pad: 12px; }
}

* { box-sizing: border-box; }
/* 연속 탭 시 '두 번 탭 확대' 방지 (두 손가락 확대는 그대로 가능) */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
button, .btn, a, input, label { touch-action: manipulation; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  background-color: var(--wall-a);
  background-image:
    linear-gradient(45deg, var(--wall-b) 25%, transparent 25%, transparent 75%, var(--wall-b) 75%),
    linear-gradient(45deg, var(--wall-b) 25%, transparent 25%, transparent 75%, var(--wall-b) 75%);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  min-height: 100vh;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
[hidden] { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }

/* 픽셀 테두리 — 레이아웃에 영향 없도록 바깥 그림자만 사용 (margin 없음) */
.pxb, .panel, .btn, .bubble, .modal-inner, .toast, input, pre, .dex-item, .diary-item, .signboard, .log-item {
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--ink),
    0 var(--px) 0 0 var(--ink),
    calc(-1 * var(--px)) 0 0 0 var(--ink),
    var(--px) 0 0 0 var(--ink);
}

/* 가운데 정렬 공통 폭 */
.wrap { width: min(var(--maxw), 100% - 2 * var(--pad) - 2 * var(--px)); margin-inline: auto; }

/* ── 차양 ── */
.awning {
  height: 44px;
  background: repeating-linear-gradient(90deg, var(--red) 0 40px, var(--paper) 40px 80px);
  border-top: 6px solid var(--ink);
  position: relative;
}
.awning::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -10px; height: 10px;
  background: repeating-linear-gradient(90deg, var(--red) 0 40px, var(--paper) 40px 80px);
  -webkit-mask: repeating-linear-gradient(90deg, transparent 0 4px, #000 4px 36px, transparent 36px 40px);
  mask: repeating-linear-gradient(90deg, transparent 0 4px, #000 4px 36px, transparent 36px 40px);
}

/* ── 간판 ── */
.signboard {
  margin-top: 30px;
  background: var(--wood-dark);
  color: #ffe8b0;
  text-align: center;
  padding: 16px var(--pad) 18px;
}
.signboard h1 { margin: 0; font-size: 28px; letter-spacing: 2px; text-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }
.sign-cup { display: inline-block; animation: bob 1.6s steps(2) infinite; }
.today { margin: 4px 0 14px; color: #f6d8a8; font-size: 14px; }
.top-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 600px; margin: 0 auto; }
.top-nav .btn { overflow: hidden; text-overflow: ellipsis; padding-inline: 6px; }
@keyframes bob { 50% { transform: translateY(-3px); } }

/* ── 버튼 ── */
.btn {
  background: var(--paper);
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--ink),
    0 var(--px) 0 0 var(--ink),
    calc(-1 * var(--px)) 0 0 0 var(--ink),
    var(--px) 0 0 0 var(--ink),
    inset -4px -4px 0 0 rgba(59, 42, 32, 0.15);
}
.btn:hover { background: #fff; }
.btn:active {
  transform: translateY(2px);
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--ink),
    0 var(--px) 0 0 var(--ink),
    calc(-1 * var(--px)) 0 0 0 var(--ink),
    var(--px) 0 0 0 var(--ink),
    inset 4px 4px 0 0 rgba(59, 42, 32, 0.15);
}
.btn:focus-visible { outline: 3px dashed var(--red); outline-offset: 6px; }
.btn.small { font-size: 13px; padding: 6px 12px; }
.btn.tiny { font-size: 12px; padding: 4px 10px; }
.btn.big { font-size: 18px; padding: 14px 22px; background: var(--yellow); }
.btn.primary { background: var(--mint); }
.btn.on, .btn.on:hover { background: var(--yellow); }
.signboard .btn { color: var(--ink); }

/* 아이콘 위 · 글자 아래 (탭/도구/컵 공통) */
.stack { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 8px 2px; line-height: 1.2; }
.stack .ic { font-size: 20px; line-height: 1; }
.stack .lb { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ── 모드 탭 ── */
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 520px; margin: 26px auto 0; }
.mode { font-size: 16px; padding: 12px 8px; }
.mode .muted { font-size: 11px; }
.mode-desc { text-align: center; margin: 12px auto 0; color: var(--muted); font-size: 13px; padding-inline: var(--pad); word-break: keep-all; }

/* ── 본문 레이아웃 ── */
.cafe {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
  margin-top: 18px;
  margin-bottom: 24px;
}
@media (min-width: 1024px) {
  .cafe { grid-template-columns: 400px minmax(0, 1fr); grid-template-areas: 'order order' 'bar shelf' 'done done'; align-items: stretch; }
  .order { grid-area: order; }
  .bar { grid-area: bar; }
  .shelf { grid-area: shelf; }
  .done-wrap { grid-area: done; }
  .shelf { align-self: start; position: sticky; top: 16px; }
  body[data-mode='my'] .cafe { grid-template-areas: 'bar shelf' 'done done'; }
}
body[data-mode='my'] .order { display: none; }
body[data-mode='my'] [data-only='game'],
body[data-mode='game'] [data-only='my'] { display: none !important; }
.panel { background: var(--paper); padding: var(--pad); min-width: 0; }

/* ── 손님 · 영업 ── */
.order { display: flex; flex-direction: column; gap: 16px; background: var(--cream); }
.shift-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; font-size: 13px; }
.shift-bar b { font-weight: normal; background: var(--paper); padding: 2px 8px; box-shadow: 0 0 0 2px var(--ink); }
.shift-dots { letter-spacing: 2px; }
.order-idle { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0; }
.order-idle p { margin: 0; word-break: keep-all; }
.idle-title { font-size: 18px; }
.countdown { font-size: 22px; letter-spacing: 2px; background: var(--paper); padding: 6px 14px; box-shadow: 0 0 0 3px var(--ink); }
#btnOpen[disabled] { opacity: 0.55; cursor: not-allowed; background: #e9dcc5; }
.order-main { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 20px; align-items: center; }
.patience { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.pbar { flex: 1; height: 10px; background: #eee3d0; box-shadow: 0 0 0 2px var(--ink); }
.pbar i { display: block; height: 100%; width: 100%; background: var(--mint); transition: width 0.25s linear; }
.pbar i.mid { background: var(--yellow); }
.pbar i.low { background: var(--red); animation: blink 0.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
.shift-sum { text-align: center; margin-bottom: 14px; }
.shift-sum .big { font-size: 26px; margin: 4px 0; }
.shift-list { display: grid; gap: 8px; margin-bottom: 16px; }
.shift-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: #fff; padding: 6px 10px; box-shadow: 0 0 0 2px var(--ink); font-size: 13px; }
.shift-row canvas { width: 32px; height: 32px; }
.shift-row .amt { white-space: nowrap; }
.result-actions.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shift-grid { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.shift-grid .card-wrap, .shift-grid pre { width: 100%; max-width: 420px; }
#shiftEnd .modal-inner { max-width: 520px; margin: 0 auto; }
#shiftText.chat { font-family: 'Apple SD Gothic Neo', 'Noto Sans CJK KR', 'Noto Sans KR', 'Malgun Gothic', -apple-system, sans-serif; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
/* 카페 영업 서빙 결과: 다음 손님 버튼만 */
.modal[data-mode='game'] .modal-inner { max-width: 560px; margin: 0 auto; }
.modal[data-mode='game'] .result-actions { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; }
.modal[data-mode='game'] .reaction { margin-bottom: 0; }
.served-cup { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.served-cup canvas { width: 96px; height: 108px; flex: none; }
.earn { font-size: 13px; color: #3f7d5c; }
.customer { width: 80px; height: 80px; animation: bob 2s steps(2) infinite; }
.bubble { background: #fff; padding: 12px 14px; position: relative; min-width: 0; }
.bubble::before {
  content: '';
  position: absolute;
  left: -14px; top: 26px;
  width: 8px; height: 8px;
  background: #fff;
  box-shadow: -4px 0 0 0 var(--ink), 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink);
}
.who { margin: 0; font-size: 12px; color: var(--muted); }
.line { margin: 2px 0 8px; font-size: 17px; word-break: keep-all; }
.hint { margin: 4px 0 10px; font-size: 13px; background: var(--cream); padding: 6px 8px; word-break: keep-all; }
.order-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ── 제조대 ── */
.bar { display: flex; flex-direction: column; gap: 16px; }
.cup-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cup-btn { padding: 6px 2px 5px; }
.cup-btn canvas { width: 44px; height: 50px; }
.cup-btn .lb { font-size: 11px; }
.cup-btn .cap { font-size: 10px; color: var(--muted); }
.temp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 300px; margin: 0 auto; }
.temp { font-size: 15px; }
.temp[data-temp='hot'].on { background: #ffb3a1; }
.temp[data-temp='ice'].on { background: #b9e3f2; }

.stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  background: linear-gradient(to bottom, transparent 86%, var(--wood) 86%, var(--wood) 93%, var(--wood-dark) 93%);
}
#cup { width: min(300px, 70vw); aspect-ratio: 64 / 72; height: auto; position: relative; z-index: 1; }
/* 꾸미기: 벽지 · 소품 · 펫 · 눈 */
.stage.walled {
  background:
    linear-gradient(to bottom, transparent 86%, var(--wood) 86%, var(--wood) 93%, var(--wood-dark) 93%),
    var(--wall) 0 0 / 64px 64px repeat;
  image-rendering: pixelated;
}
.stage-prop, .stage-pet { position: absolute; bottom: 14%; width: 64px; height: auto; z-index: 2; pointer-events: none; }
.stage-prop { left: 3%; }
/* 소품 2개: 나란히, 조금 작게 */
.stage.two-props .stage-prop { width: 52px; }
.stage-prop2 { left: calc(3% + 56px); }
.stage-pet { right: 3%; }
.stage.snow::after {
  content: '';
  position: absolute;
  inset: 0 0 14% 0;
  pointer-events: none;
  background-image: radial-gradient(#fff 1.5px, transparent 2px), radial-gradient(#dfe6ff 1px, transparent 1.5px);
  background-size: 48px 48px, 32px 32px;
  background-position: 0 0, 16px 8px;
  animation: snowfall 7s linear infinite;
}
@keyframes snowfall { to { background-position: 0 48px, 16px 40px; } }
#cup.shake { animation: shake 0.35s steps(4) 2; }
@keyframes shake { 25% { transform: translate(-3px, 0); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, 2px); } }
.gauge { position: absolute; left: calc(50% + min(150px, 35vw) + 10px); top: 8%; display: flex; flex-direction: column-reverse; gap: 2px; }
.gauge i { width: 12px; height: 7px; background: #e9dcc5; box-shadow: 0 0 0 2px var(--ink); }
.gauge i.f { background: var(--wood); }

.now { text-align: center; min-height: 84px; }
.now-label { margin: 0; font-size: 12px; color: var(--muted); }
.now-name { margin: 2px 0 6px; font-size: 20px; word-break: keep-all; }
.chips { margin: 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 22px; }
.chip { font-size: 12px; padding: 1px 8px; background: var(--cream); box-shadow: 0 0 0 2px var(--ink); }
.chip.new { background: var(--yellow); animation: bob 0.8s steps(2) infinite; }
.chip.exp { background: #e7d4f7; }
.chip.slang { background: #c9ecd9; }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

/* ── 재료 선반 ── */
.shelf { background: #f7e2c2; display: flex; flex-direction: column; gap: 18px; }
.tabs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.tab { padding: 7px 0 6px; }
.tab .lb { letter-spacing: -0.3px; }
.ings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
}
.ing { position: relative; height: 100%; padding: 10px 6px 12px; gap: 4px; }
.ing .ic { font-size: 26px; }
.ing .nm { font-size: 12px; text-align: center; word-break: keep-all; line-height: 1.25; min-height: 2.5em; display: flex; align-items: center; }
.ing .sw { width: 70%; height: 6px; box-shadow: 0 0 0 2px var(--ink); }
.ing .cnt { position: absolute; top: -8px; right: -8px; background: var(--red); color: #fff; font-size: 11px; padding: 0 5px; box-shadow: 0 0 0 2px var(--ink); }
.shelf-tip { margin: 0; text-align: center; word-break: keep-all; }

.done-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 4px; }
.done-wrap .btn { width: min(100%, 420px); }
.done-wrap p { margin: 0; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 10px var(--pad) 30px; }

/* ── 태블릿 (600~1023) ── */
@media (min-width: 600px) and (max-width: 1023px) {
  .ings { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ── 모바일 (~599) ── */
@media (max-width: 599px) {
  body { font-size: 14px; }
  .awning { height: 34px; }
  .signboard { margin-top: 22px; padding-bottom: 14px; }
  .signboard h1 { font-size: 21px; letter-spacing: 1px; }
  .today { font-size: 12px; margin-bottom: 12px; }
  .top-nav { grid-template-columns: 1fr 1fr; gap: 12px 12px; max-width: 320px; }
  .top-nav .btn { font-size: 12px; padding: 6px 4px; }
  .mode-tabs { gap: 12px; margin-top: 22px; }
  .mode { font-size: 14px; padding: 10px 4px; }
  .mode-desc { font-size: 12px; }
  .order-main { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; }
  .shift-bar { justify-content: center; }
  .result-actions.three { grid-template-columns: 1fr; }
  .stage-prop, .stage-pet { width: 46px; }
  .stage.two-props .stage-prop { width: 40px; }
  .stage-prop2 { left: calc(3% + 43px); }
  .customer { width: 64px; height: 64px; }
  .bubble { width: 100%; }
  .bubble::before { display: none; }
  .order-actions { justify-content: center; }
  .cup-row { gap: 7px; }
  .cup-btn canvas { width: 34px; height: 38px; }
  .cup-btn .lb { font-size: 10px; letter-spacing: -0.5px; }
  .tools { gap: 8px; }
  .stack .lb { font-size: 11px; }
  /* 모바일: 3×3 격자, 아이콘과 이름을 나란히 */
  .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 10px; }
  .tab { flex-direction: row; justify-content: center; gap: 6px; padding: 8px 4px; }
  .tab .ic { font-size: 18px; }
  .tab .lb { font-size: 13px; letter-spacing: 0; }
  .ings { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .ing .ic { font-size: 24px; }
  .ing .nm { font-size: 11px; }
  .done-wrap .btn { font-size: 16px; }
}

/* ── 모달 ── */
.modal { border: 0; padding: 0; background: transparent; width: min(980px, 100% - 24px); max-width: none; color: var(--ink); overflow: visible; }
.modal::backdrop { background: rgba(59, 42, 32, 0.55); }
.modal-inner { background: var(--paper); padding: 20px; position: relative; max-height: calc(100dvh - 48px); overflow: auto; }
.modal h2 { margin: 0 0 14px; font-size: 20px; padding-right: 28px; }
.close { position: absolute; right: 12px; top: 10px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.reaction { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 16px; background: var(--cream); padding: 10px 12px; }
.reaction canvas { width: 48px; height: 48px; }
.reaction .score { font-size: 22px; white-space: nowrap; }
.result-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .result-grid { grid-template-columns: 340px minmax(0, 1fr); } }
.card-wrap img { width: 100%; max-width: 340px; display: block; margin: 0 auto; box-shadow: 6px 6px 0 rgba(59, 42, 32, 0.25); }
.result-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.result-form label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.result-form label.check { flex-direction: row; align-items: center; gap: 8px; }
/* 아이폰은 16px보다 작은 입력창을 누르면 자동 확대 → 16px */
input:not([type='checkbox']) { border: 0; padding: 9px 10px; background: #fff; width: 100%; font-size: 16px; }
input:focus { outline: 3px dashed var(--red); outline-offset: 4px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.share-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
pre {
  margin: 0;
  font-family: var(--mono);
  background: #2b211b;
  color: #ffe8c2;
  padding: 12px;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre;
  overflow: auto;
  max-height: 340px;
}
/* 공유 텍스트 미리보기: 코드블록이면 고정폭, 아니면 메신저처럼 일반 한글 글꼴 */
#shareText.chat { font-family: 'Apple SD Gothic Neo', 'Noto Sans CJK KR', 'Noto Sans KR', 'Malgun Gothic', -apple-system, sans-serif; font-size: 14px; line-height: 1.35; }
#shareText.code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'DejaVu Sans Mono', monospace; }
.result-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.result-actions .btn { padding: 10px 4px; }
@media (max-width: 599px) {
  .modal-inner { padding: 16px 14px; }
  .reaction { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
  .reaction canvas { width: 40px; height: 40px; }
  .reaction .score { font-size: 18px; }
  .result-actions { grid-template-columns: 1fr 1fr; gap: 12px; }
  pre { font-size: 12px; }
}

/* ── 꾸미기 상점 ── */
.wallet-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--cream); padding: 8px 12px; box-shadow: 0 0 0 3px var(--ink); margin: 4px 3px 10px; }
.wallet-bar b { font-weight: normal; font-size: 18px; }
.shop-tabs { margin: 14px 0 6px; }
.shop-group h3, #shopBody > h3 { margin: 18px 0 10px; font-size: 15px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.item-card { background: #fff; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; box-shadow: 0 0 0 3px var(--ink); border-top: 5px solid #e9dcc5; }
.item-card.r-rare { border-top-color: #4a8fe0; }
.item-card.r-legend { border-top-color: #e0a100; background: #fffaf0; }
.item-card.equipped { background: #fff4c7; }
.item-card.locked { background: #efe7da; color: var(--muted); }
.item-cv { image-rendering: pixelated; }
.item-name { font-size: 13px; word-break: keep-all; }
.item-name.big { font-size: 20px; }
.item-sub { font-size: 12px; }
.item-q { font-size: 34px; line-height: 72px; height: 72px; }
.item-card .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.gacha-result { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 230px; justify-content: center; text-align: center; background: var(--cream); margin: 12px 3px; padding: 14px; box-shadow: 0 0 0 3px var(--ink); }
.gacha-result p { margin: 0; }
.gacha-machine { font-size: 72px; line-height: 1; }
.gacha-machine.shake { animation: shake 0.3s steps(3) 3; }
.gacha-reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: pop 0.35s steps(4); }
.gacha-reveal .rar { color: #fff; padding: 2px 12px; font-size: 14px; box-shadow: 0 0 0 2px var(--ink); }
.gacha-reveal.r-legend { filter: drop-shadow(0 0 10px #ffd34d); }
@keyframes pop { from { transform: scale(0.6); } to { transform: scale(1); } }
.gacha-actions { display: flex; justify-content: center; margin: 6px 0; }
.gacha-actions .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.center { text-align: center; }
.machine-tabs { margin: 14px 0 0; }
.xmas-btn { background: #ffe1e1; }
.xmas-btn.on { background: #e06666; color: #fff; }
.season-banner { margin: 12px 3px 0; padding: 8px 12px; text-align: center; color: #fff; background: repeating-linear-gradient(90deg, #c8343c 0 16px, #2f7d3c 16px 32px); box-shadow: 0 0 0 3px var(--ink); text-shadow: 1px 1px 0 var(--ink); word-break: keep-all; }
.gacha-result.xmas { background: #fff3f3 radial-gradient(#ffffff 1.5px, transparent 2px) 0 0 / 24px 24px; }
@media (max-width: 599px) {
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .item-card { padding: 8px 4px; }
  .item-card .item-cv { width: 56px !important; height: auto !important; }
}

/* ── 계정 ── */
.modal-sm { width: min(420px, 100% - 24px); }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin: 18px 0 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.auth-err { margin: 0; min-height: 1.2em; color: #c0392b; font-size: 13px; }
.auth-form .btn[disabled] { opacity: 0.6; cursor: wait; }
#authGuest .seg { margin-top: 4px; }
#authUser p { margin: 8px 0; }
#authUser .btn { margin-top: 10px; }

/* ── 도감 ── */
.dex-group h3 { margin: 18px 0 10px; font-size: 15px; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.dex-item { background: #fff; padding: 8px 10px; position: relative; }
.dex-item.got { background: #eaf7ef; }
.dex-item .t { font-size: 14px; }
.dex-item .r { font-size: 13px; color: var(--muted); word-break: break-all; }
.dex-item .stamp { position: absolute; right: 6px; top: 2px; color: var(--red); font-size: 18px; transform: rotate(12deg); }

/* ── 일기 ── */
#diaryList { display: grid; gap: 14px; margin-bottom: 18px; }
.diary-item { background: #fff; padding: 8px 10px; }
.diary-item .d { font-size: 12px; color: var(--muted); }
.diary-item .n { font-size: 16px; }

/* ── 토스트 ── */
.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translate(-50%, 140%);
  background: var(--ink);
  color: #ffe8b0;
  padding: 10px 16px;
  transition: transform 0.2s steps(3);
  z-index: 50;
  pointer-events: none;
  max-width: calc(100% - 32px);
  text-align: center;
  word-break: keep-all;
}
.toast:not(.show) { visibility: hidden; }
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── 지난 영업 기록 ── */
.idle-links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
#shiftLogList { display: grid; gap: 18px; margin-top: 8px; }
.log-day h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.log-day { display: grid; gap: 10px; }
.log-item {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; text-align: left;
  width: 100%; padding: 10px 12px; background: #fff; border: 0; font: inherit; color: inherit; cursor: pointer;
}
.log-item:hover { background: #fff8e6; }
.log-no { grid-row: span 2; font-weight: bold; background: var(--yellow); padding: 4px 8px; }
.log-faces { font-size: 18px; letter-spacing: 1px; }
.log-sum { font-size: 13px; color: var(--muted); }
.col-head { margin: 14px 0 8px; font-size: 13px; color: var(--muted); }
