/* 화면 위 글자는 최소한으로. 배 안에 인쇄된 표지판처럼 조용히 둔다. */
:root {
  --ink: #f2e9d6;
  --dim: rgba(242, 233, 214, .62);
  --amber: #f1a44a;
  --glass: rgba(9, 11, 16, .62);
  --sans: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: #04060b; color: var(--ink); font-family: var(--sans); -webkit-tap-highlight-color: transparent; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; }
#view.grabbing { cursor: grabbing; }
#view.pointing { cursor: pointer; }

#plate {
  position: fixed; top: max(20px, env(safe-area-inset-top)); left: 24px;
  pointer-events: none; text-shadow: 0 1px 12px rgba(0, 0, 0, .75);
  transition: opacity .6s;
}
#plate .ship { font-size: 19px; font-weight: 700; letter-spacing: .18em; }
#plate .where { margin-top: 3px; font-size: 12px; letter-spacing: .06em; color: var(--dim); }
#plate .count { margin-top: 9px; font-size: 12.5px; color: var(--dim); display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
#plate .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
#plate .count.off .dot { background: #d9604a; box-shadow: 0 0 8px #d9604a; }

#sound {
  position: fixed; top: max(20px, env(safe-area-inset-top)); right: 22px;
  border: 0; background: none; color: var(--dim); font: 500 12px var(--sans); letter-spacing: .05em;
  padding: 6px 4px; cursor: pointer; text-shadow: 0 1px 10px rgba(0, 0, 0, .8);
}
#sound:hover { color: var(--ink); }

kbd {
  display: inline-block; min-width: 18px; padding: 1px 5px; margin: 0 1px; text-align: center;
  font: 600 11px var(--sans); color: var(--ink);
  background: rgba(255, 255, 255, .12); border-radius: 4px;
}

#hint {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 22px; white-space: nowrap; pointer-events: none;
  font-size: 12.5px; color: var(--dim); text-shadow: 0 1px 8px #000; transition: opacity 1s;
}
#hint b { font-weight: 600; color: var(--ink); }
#hint.gone { opacity: 0; }

#prompt {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 99px; background: var(--glass); backdrop-filter: blur(8px);
  font-size: 13.5px; white-space: nowrap; pointer-events: none;
}
#prompt em { font-style: normal; color: #ff8a6e; margin-left: 7px; }

#stand {
  position: fixed; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  border: 0; padding: 9px 18px; border-radius: 99px; color: var(--ink); background: var(--glass); backdrop-filter: blur(8px);
  font: 500 13.5px var(--sans); cursor: pointer; opacity: .55; transition: opacity .25s;
}
#stand:hover { opacity: 1; }

#greet {
  position: fixed; right: 22px; bottom: max(22px, env(safe-area-inset-bottom));
  border: 0; padding: 9px 14px; border-radius: 99px; color: var(--ink); background: var(--glass); backdrop-filter: blur(8px);
  font: 500 13.5px var(--sans); cursor: pointer;
}
#greet:hover { background: rgba(30, 33, 42, .8); }
#greet:active { transform: scale(.96); }

#update {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 3;
  border: 0; padding: 8px 16px; border-radius: 99px; color: #1a120a; background: var(--amber);
  font: 600 13px var(--sans); cursor: pointer; white-space: nowrap;
}

.bubble {
  position: absolute; left: 0; top: 0; padding: 6px 12px; border-radius: 14px;
  font-size: 13.5px; font-weight: 600; line-height: 1.3; color: #2a2118; background: #fbf5e8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35); white-space: nowrap; will-change: transform;
  animation: bubble-in .22s ease-out;
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px;
  border-style: solid; border-width: 6px 6px 0; border-color: #fbf5e8 transparent transparent;
}
@keyframes bubble-in { from { opacity: 0; margin-top: 8px; } to { opacity: 1; margin-top: 0; } }

#tags { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.tag {
  position: absolute; left: 0; top: 0; padding: 2px 8px; border-radius: 99px;
  font-size: 11.5px; line-height: 1.4; color: var(--ink); background: rgba(8, 10, 15, .5);
  white-space: nowrap; will-change: transform; transition: opacity .25s;
}

#stick {
  position: fixed; left: 28px; bottom: max(30px, env(safe-area-inset-bottom)); width: 118px; height: 118px;
  border-radius: 50%; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); touch-action: none;
}
#stick-knob { position: absolute; left: 34px; top: 34px; width: 50px; height: 50px; border-radius: 50%; background: rgba(242, 233, 214, .55); }
#act {
  position: fixed; right: 26px; bottom: max(44px, env(safe-area-inset-bottom)); width: 84px; height: 84px; border-radius: 50%;
  border: 0; font: 600 14px var(--sans); color: #1a120a; background: var(--amber); cursor: pointer;
}

#status {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%);
  padding: 7px 14px; border-radius: 99px; background: rgba(120, 30, 20, .75); font-size: 13px;
}

#boarding {
  position: fixed; inset: 0; display: grid; place-items: center; background: #04060b;
  transition: opacity 1.6s ease .2s; z-index: 5;
}
#boarding.done { opacity: 0; pointer-events: none; }
.boarding-inner { text-align: center; }
.b-title { font-size: 30px; font-weight: 700; letter-spacing: .34em; margin-right: -.34em; }
.b-sub { margin-top: 10px; font-size: 13px; color: var(--dim); }
.b-bar { margin: 22px auto 0; width: 190px; height: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.b-bar i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .3s; }

body.seated #plate { opacity: .55; }

@media (pointer: coarse) {
  kbd { display: none; }
  #stand { left: auto; right: 24px; transform: none; bottom: max(144px, env(safe-area-inset-bottom)); opacity: .9; }
  #greet { right: 24px; bottom: auto; top: max(58px, env(safe-area-inset-top)); }
}

@media (max-width: 720px) {
  #hint { display: none; }
  #plate { left: 18px; }
  #plate .ship { font-size: 16px; }
  #prompt { bottom: 172px; max-width: 86vw; font-size: 12.5px; }
}
