/* ============================================================
   minpaku/assets/css/guest.css
   宿泊者向け 滞在中UI(モバイル優先・大きめタップ領域)
   ============================================================ */

:root {
  --g-bg:        #faf8f3;
  --g-surface:   #ffffff;
  --g-surface2:  #f5f2ea;
  --g-border:    #e7e2d3;
  --g-text:      #1f2933;
  --g-text-sub:  #5a6573;
  --g-text-dim:  #8a93a0;
  --g-navy:      #1f3a5c;
  --g-teal:      #4ab5a8;
  --g-teal-dark: #369488;
  --g-teal-soft: #e4f4f2;
  --g-coral:     #e8826a;
  --g-coral-soft:#fdf0ed;
  --g-gold:      #c8a35c;
  --g-radius:    14px;
  --g-radius-sm: 10px;
  --g-shadow:    0 2px 12px rgba(31,58,92,.06);
  --g-shadow-lg: 0 12px 32px rgba(31,58,92,.12);
  --g-tabbar-h:  64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Zen Kaku Gothic New','Noto Sans JP','Noto Sans SC','Noto Sans KR',system-ui,sans-serif;
  background: var(--g-bg);
  color: var(--g-text);
  line-height: 1.7;
  padding-bottom: var(--g-tabbar-h);
}

/* ── Header ── */
.g-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--g-border);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; min-height: 56px;
}
.g-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--g-navy); font-weight: 900; font-size: 15px; }
.g-logo-ico { font-size: 20px; }
.g-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.mp-lang-switcher {
  display: inline-flex; gap: 0; border: 1.5px solid var(--g-border);
  border-radius: 999px; overflow: hidden; background: #fff;
}
.mp-lang-link {
  padding: 4px 9px; font-size: 11px; font-weight: 700;
  color: var(--g-text-sub); text-decoration: none;
  border-right: 1px solid var(--g-border);
}
.mp-lang-link:last-child { border-right: 0; }
.mp-lang-link.active { background: var(--g-navy); color: #fff; }

.g-header-logout {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--g-surface2); color: var(--g-text-sub);
  text-decoration: none; font-size: 16px;
}

/* ── Main ── */
.g-main { max-width: 720px; margin: 0 auto; padding: 16px 16px 24px; }

/* ── Card ── */
.g-card {
  background: var(--g-surface); border: 1px solid var(--g-border);
  border-radius: var(--g-radius); padding: 18px 20px; margin-bottom: 14px;
  box-shadow: var(--g-shadow);
}
.g-card h2 { font-size: 16px; margin: 0 0 12px; font-weight: 900; color: var(--g-navy); }
.g-card .lead { color: var(--g-text-sub); font-size: 14px; margin: 0 0 14px; }

/* ── Welcome card (top) ── */
.g-welcome {
  background: linear-gradient(135deg, var(--g-navy) 0%, var(--g-teal-dark) 100%);
  color: #fff;
  border-radius: var(--g-radius);
  padding: 24px 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--g-shadow-lg);
}
.g-welcome .label { font-size: 11px; opacity: .8; letter-spacing: .1em; text-transform: uppercase; }
.g-welcome .name { font-size: 22px; font-weight: 900; margin: 4px 0 14px; line-height: 1.4; }
.g-welcome .info { font-size: 13px; opacity: .95; line-height: 1.85; }
.g-welcome .info strong { color: #fff; }
.g-welcome .code { font-family: monospace; background: rgba(255,255,255,.18); padding: 3px 9px; border-radius: 6px; font-weight: 700; }

/* ── Action buttons ── */
.g-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-action {
  background: var(--g-surface); border: 1.5px solid var(--g-border);
  border-radius: var(--g-radius); padding: 22px 16px; text-decoration: none;
  color: var(--g-text); display: flex; flex-direction: column; align-items: center;
  gap: 8px; transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: var(--g-shadow);
  text-align: center;
}
.g-action:hover { transform: translateY(-2px); box-shadow: var(--g-shadow-lg); border-color: var(--g-teal); text-decoration: none; color: var(--g-text); }
.g-action.urgent { border-color: var(--g-coral); background: linear-gradient(180deg,#fff,var(--g-coral-soft)); }
.g-action .ico { font-size: 32px; }
.g-action .ttl { font-weight: 900; font-size: 15px; line-height: 1.4; }
.g-action .sub { font-size: 11px; color: var(--g-text-sub); margin-top: 2px; }

/* ── Form ── */
.g-form { display: grid; gap: 14px; }
.g-form label { display: block; font-size: 13px; font-weight: 700; color: var(--g-text); margin-bottom: 6px; }
.g-form input, .g-form select, .g-form textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--g-border);
  border-radius: var(--g-radius-sm); font-size: 15px; font-family: inherit;
  background: #fff; color: var(--g-text);
}
.g-form input:focus, .g-form select:focus, .g-form textarea:focus {
  outline: 0; border-color: var(--g-teal); box-shadow: 0 0 0 3px rgba(74,181,168,.18);
}
.g-form textarea { min-height: 100px; resize: vertical; }

.g-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: 999px; background: var(--g-teal); color: #fff;
  font-weight: 900; font-size: 15px; border: none; cursor: pointer; text-decoration: none;
  font-family: inherit; transition: background .15s, transform .12s;
  width: 100%;
}
.g-btn:hover { background: var(--g-teal-dark); color: #fff; text-decoration: none; }
.g-btn.secondary { background: var(--g-surface2); color: var(--g-text); }
.g-btn.gold { background: var(--g-gold); }

/* ── Alert ── */
.g-alert { padding: 14px 16px; border-radius: var(--g-radius); font-size: 14px; line-height: 1.7; margin-bottom: 14px; }
.g-alert.success { background: var(--g-teal-soft); color: var(--g-teal-dark); border: 1.5px solid var(--g-teal); }
.g-alert.error   { background: #fdecea; color: #991b1b; border: 1.5px solid var(--g-coral); }
.g-alert.info    { background: #e7edf4; color: var(--g-navy); border: 1.5px solid var(--g-navy); }

/* ── Manual list ── */
.g-manual-list { display: flex; flex-direction: column; gap: 10px; }
.g-manual-item {
  background: var(--g-surface); border: 1px solid var(--g-border);
  border-radius: var(--g-radius); padding: 16px 18px;
  cursor: pointer; transition: border-color .12s;
}
.g-manual-item:hover { border-color: var(--g-teal); }
.g-manual-item summary {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 15px; color: var(--g-text);
  cursor: pointer; list-style: none; outline: none;
}
.g-manual-item summary::-webkit-details-marker { display: none; }
.g-manual-item summary::after { content: '＋'; margin-left: auto; color: var(--g-teal); font-weight: 700; font-size: 18px; }
.g-manual-item[open] summary::after { content: '−'; }
.g-manual-item summary .ico { font-size: 22px; }
.g-manual-item .body { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--g-border);
  font-size: 14px; line-height: 1.85; color: var(--g-text); white-space: pre-wrap; }

.g-manual-item.emergency { border-left: 4px solid var(--g-coral); }

/* ── Star rating input ── */
.g-stars { display: flex; gap: 4px; }
.g-stars input[type=radio] { display: none; }
.g-stars label {
  font-size: 32px; color: #e5e7eb; cursor: pointer; line-height: 1;
  margin: 0; transition: color .12s;
}
.g-stars label:hover, .g-stars label:hover ~ label { color: #fcd34d !important; }
.g-stars input:checked ~ label { color: #fcd34d; }
/* 直感的な左→右に星を増やす表現のため、reverse ではなく順序維持で「checked ~ label」スタイルを別実装 */
.g-stars-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; }
.g-stars-row input { display: none; }
.g-stars-row label { font-size: 36px; color: #e5e7eb; cursor: pointer; line-height: 1; padding: 0 3px; }
.g-stars-row input:checked ~ label,
.g-stars-row label:hover,
.g-stars-row label:hover ~ label { color: #fcd34d; }

/* ── Tabbar (bottom nav) ── */
.g-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; background: #fff; border-top: 1px solid var(--g-border);
  height: var(--g-tabbar-h);
  box-shadow: 0 -4px 16px rgba(0,0,0,.04);
}
.g-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: var(--g-text-sub);
  font-size: 11px; font-weight: 700; transition: color .12s;
}
.g-tab:hover { color: var(--g-teal-dark); text-decoration: none; }
.g-tab-ico { font-size: 22px; line-height: 1; }
.g-tab-lbl { font-size: 10.5px; }

/* ── Login screen ── */
.g-login-card {
  max-width: 420px; margin: 32px auto; background: var(--g-surface);
  border: 1px solid var(--g-border); border-radius: var(--g-radius);
  padding: 28px 28px 32px; box-shadow: var(--g-shadow-lg);
}
.g-login-card h1 { text-align: center; font-size: 20px; color: var(--g-navy); margin: 0 0 6px; font-weight: 900; }
.g-login-card .lead { text-align: center; font-size: 13px; color: var(--g-text-sub); margin: 0 0 20px; }

/* ── プレビューモードバナー ── */
.g-preview-banner {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
  color: #fff; font-weight: 700; font-size: 13px;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 2px 12px rgba(245,158,11,.4);
}
.g-preview-banner .g-preview-exit {
  background: rgba(0,0,0,.18); color: #fff; padding: 4px 12px; border-radius: 999px;
  text-decoration: none; font-size: 11.5px; white-space: nowrap;
}
.g-preview-banner .g-preview-exit:hover { background: rgba(0,0,0,.32); color: #fff; text-decoration: none; }
body.preview-mode .g-header { top: 38px; }  /* バナー分ずらす(sticky のため両方が積まれる) */
body.preview-mode .g-tabbar  { background: #fffbeb; border-top-color: #fde68a; }

@media (max-width: 480px) {
  .g-actions { grid-template-columns: 1fr 1fr; }
  .g-action { padding: 18px 12px; }
  .g-action .ico { font-size: 28px; }
}
