/* Styles for 5th Upgrade: Interactive Watercolor Island, Analog Post Office, Stamp Album, Wooden Guestbook, Island Decor Shop */

/* ==================== INTERACTIVE ISLAND ==================== */

.island-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.island-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.island-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.island-header-bar h1 {
  margin: 2px 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.island-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.island-stage-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: #87c4cb;
  aspect-ratio: 1 / 1;
  max-height: 580px;
  width: 100%;
  touch-action: none;
}

.island-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.island-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.island-code-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.island-code-pill code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.gb-meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.po-route-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.po-route-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 9px 11px;
  background: var(--surface);
  cursor: pointer;
}

.po-route-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.po-route-text strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.po-route-text span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.po-route-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e6f2f7;
  color: #1f5f7d;
  font-size: 12px;
  font-weight: 700;
}

.island-stage-card.is-editing {
  outline: 3px solid rgba(62, 178, 96, 0.55);
}

.island-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.island-tip-pill {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(34, 26, 18, 0.72);
  backdrop-filter: blur(8px);
  color: #fff8ee;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}

.island-tip-pill.is-invalid {
  background: rgba(168, 36, 32, 0.88);
}

/* Floating Last-War style ✓ / ✕ / 🎒 confirm buttons beside the moving object */

.island-float-actions {
  position: absolute;
  transform: translate(-50%, -100%);
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.94);
  box-shadow: 0 8px 22px rgba(24, 18, 12, 0.28);
  z-index: 6;
}

.island-float-actions.is-visible {
  display: inline-flex;
}

.island-confirm-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  font-size: 16px;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.island-confirm-btn:hover:not(:disabled) {
  transform: scale(1.08);
}

.island-confirm-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.island-confirm-btn.is-ok {
  background: #2f9a53;
  color: #fff;
}

.island-confirm-btn.is-cancel {
  background: #d8453e;
  color: #fff;
}

.island-confirm-btn.is-store {
  background: #f0e4d0;
  color: #4a3520;
  font-size: 15px;
}

.island-bag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.island-bag-chip {
  border: 0.5px solid var(--border);
  background: var(--surface-2);
  border-radius: 14px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.island-bag-chip img {
  object-fit: contain;
}

.island-bag-chip small {
  color: var(--ink-3);
  font-size: 12px;
}

.island-bag-chip.is-selected {
  border-color: #2f9a53;
  background: #ebf8ef;
}

.island-quick-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.island-quick-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.island-quick-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.island-quick-card img {
  object-fit: contain;
  flex-shrink: 0;
}

.island-quick-card strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
}

.island-quick-card > div > span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.unread-dot {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #c85b33;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

/* Landscape compact mobile (e.g. 844x390 desk stand) */

@media (max-height: 460px) and (orientation: landscape) {
  .island-layout {
    gap: 8px;
  }

  .island-header-bar h1 {
    font-size: 17px;
  }

  .island-stage-card {
    aspect-ratio: auto;
    height: calc(100dvh - 134px);
    min-height: 220px;
  }
}

/* ==================== ANALOG POST OFFICE ==================== */

.postoffice-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.po-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.po-subtab {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.po-subtab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.po-inbox-stack,
.po-stamps-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.po-today-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.po-today-body {
  flex: 1;
  min-width: 220px;
}

.po-today-quote {
  margin: 8px 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink);
}

.po-today-author {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.po-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.po-letter-card {
  border: 0.5px solid;
  border-radius: 14px;
  padding: 16px;
}

.po-letter-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.po-lang-switch {
  display: inline-flex;
  gap: 4px;
}

.po-lang-btn {
  border: 1px solid rgba(60, 40, 20, 0.2);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.po-lang-btn.is-active {
  background: #3d2a1c;
  color: #fff;
  border-color: #3d2a1c;
}

.po-letter-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
}

.po-letter-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.po-report-btn {
  border: 1px solid rgba(180, 52, 46, 0.35);
  background: rgba(255, 245, 244, 0.85);
  color: #a92e28;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.po-saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.po-saved-item {
  border: 0.5px solid;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.po-saved-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.po-del-saved-btn {
  border: 0;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.po-saved-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.po-saved-author {
  font-size: 12px;
  opacity: 0.75;
  margin-top: auto;
}

/* Compose Grid */

.po-compose-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 820px) {
  .po-compose-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

.po-stationery-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.po-st-card {
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: var(--surface);
}

.po-st-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.po-st-swatch {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 0.5px solid;
  flex-shrink: 0;
}

.po-st-info {
  flex: 1;
  min-width: 0;
}

.po-st-info strong {
  display: block;
  font-size: 13px;
}

.po-st-info span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}

.po-preview-badge {
  font-size: 12px;
  font-weight: 700;
  color: #9e6a22;
  background: #fdf2dc;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.po-wax-row,
.po-stamp-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.po-wax-btn,
.po-stamp-chip {
  border: 0.5px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.po-wax-btn.is-selected,
.po-stamp-chip.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.po-wax-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.po-paper-preview {
  border: 0.5px solid;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.po-paper-head,
.po-paper-seal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.po-letter-textarea {
  width: 100%;
  border: 0;
  background: transparent;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: inherit;
  outline: none;
}

.po-wax-badge {
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.po-target-box {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.po-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.po-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
}

.po-send-btn {
  width: 100%;
}

.po-no-speedup-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

.po-voyage-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.po-voyage-section h3 {
  margin: 0 0 10px;
  font-size: 14.5px;
}

.po-voyage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.po-voyage-card {
  border: 1px solid var(--border);
  background: #f5f9fb;
  border-radius: 14px;
  padding: 12px;
}

.po-voyage-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 13px;
}

.po-voyage-timer {
  font-weight: 700;
  color: #25688f;
  font-variant-numeric: tabular-nums;
}

.po-voyage-snippet {
  margin: 6px 0 4px;
  font-size: 13px;
  color: var(--ink-2);
}

.po-voyage-meta {
  font-size: 12px;
  color: var(--ink-3);
}

/* Stamp Album */

.stamp-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.stamp-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.stamp-card strong {
  font-size: 13px;
}

.stamp-card p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
}

.stamp-wait-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface-2);
  padding: 4px 8px;
  border-radius: 999px;
}

/* ==================== WOODEN GUESTBOOK MODAL ==================== */

.gb-modal {
  width: min(620px, 94vw);
  max-height: 88dvh;
  overflow-y: auto;
  background: #fbf5ea;
  border: 4px solid #8f633a;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 22px 54px rgba(24, 14, 6, 0.36);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gb-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.gb-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #9e5a2b;
}

.gb-header h2 {
  margin: 3px 0 6px;
  font-size: 20px;
  color: #362212;
}

.gb-footprint-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e9f4e7;
  border: 1px solid #a8cfa1;
  color: #2c6228;
  font-size: 12px;
  font-weight: 700;
}

.gb-close-x {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 15px;
  font-weight: 700;
}

.gb-corkboard {
  background: #ecd7b6;
  border: 0.5px solid #c39a68;
  border-radius: 14px;
  padding: 14px;
}

.gb-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13.5px;
}

.gb-safe-hint {
  font-size: 12px;
  color: var(--ink-3);
}

.gb-empty {
  margin: 0;
  font-size: 12.5px;
  color: #6b5239;
}

.gb-pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.gb-pin-note {
  background: #fffdf7;
  border: 1px solid #d4b88d;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 4px 10px rgba(60, 38, 16, 0.08);
}

.gb-pin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #9e4d25;
  margin-bottom: 6px;
}

.gb-unpin-btn {
  border: 0;
  background: #f4e6d2;
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
}

.gb-pin-note p {
  margin: 0;
  font-size: 13px;
  color: #312115;
}

.gb-entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gb-entry-row {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.gb-entry-main {
  flex: 1;
  min-width: 180px;
}

.gb-entry-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.gb-kind-tag {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-3);
}

.gb-entry-main p {
  margin: 4px 0 0;
  font-size: 13px;
}

.gb-entry-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.gb-mini-danger {
  border: 1px solid rgba(180, 52, 46, 0.3);
  background: #fff5f4;
  color: #a92e28;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.gb-compose-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.gb-input-sm {
  width: 130px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  background: #fff;
}

.gb-input-grow {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  background: #fff;
}

/* ==================== ISLAND DECOR SHOP (in 선물·상점) ==================== */

.decor-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 10px;
}

.decor-shop-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.decor-shop-img {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
}

.decor-shop-img img {
  object-fit: contain;
}

.decor-own-badge {
  position: absolute;
  top: -4px;
  right: -10px;
  background: #e7f4ea;
  color: #256c3b;
  border: 1px solid #a9d5b6;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 700;
}

.decor-shop-name {
  font-size: 13px;
  font-weight: 700;
}

.decor-shop-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
  flex: 1;
}
