/* Group Capsule — tabs, host form, story preview, room, keepsake box, note reader */

.gc {
  --gc-flap: #F1EADB;
  --gc-flap-deep: #E9E0CC;
  --gc-wax-deep: #96392A;
  --gc-brass-soft: #E8C88E;
  position: relative;
  color: var(--ink-main, #1C2722);
  font-family: var(--font-sans, "Plus Jakarta Sans", system-ui, sans-serif);
}
.gc *, .gc *::before, .gc *::after { box-sizing: border-box; }
.gc [hidden] { display: none !important; }
:where(.gc button) { font: inherit; color: inherit; }
.gc-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gc-seal-art svg, .gc-story-seal svg, .gc-room-seal svg, .gc-env-seal svg, .gc-note-seal svg, .gc-join-seal svg, .gc-mini-seal svg, .gc-mine-seal svg { display: block; width: 100%; height: 100%; }

/* ---------- Tabs ---------- */
.gc-tabs {
  display: inline-grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 4px; margin-bottom: 18px; padding: 5px;
  background: var(--bg-sage-tint, #EAEFE9); border: 1px solid rgba(35, 75, 62, .12); border-radius: 12px;
}
.gc-tab {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--ink-muted, #52625B);
  transition: background-color .2s ease, color .2s ease;
}
.gc-tab:hover { color: var(--bg-pine, #234B3E); }
.gc-tab.is-active { background: var(--bg-paper, #FFFDF9); color: var(--ink-main, #1C2722); box-shadow: 0 1px 3px rgba(28, 39, 34, .06); }
.gc-tab-num {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid currentColor; font-size: 12px; font-weight: 700;
}
.gc-tab.is-active .gc-tab-num { background: var(--accent-wax, #BA4A36); border-color: var(--accent-wax, #BA4A36); color: var(--bg-paper, #FFFDF9); }

/* ---------- Panels ---------- */
.gc-panel { animation: gc-rise .35s ease; }
.gc-create { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.gc-form {
  padding: 26px; background: var(--bg-paper, #FFFDF9); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(28, 39, 34, .09);
}
.gc-field { margin-bottom: 18px; }
.gc-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.gc-label { display: block; margin: 0 0 7px; font-size: 14px; font-weight: 700; color: var(--ink-main, #1C2722); }
.gc-label span { font-weight: 500; color: var(--ink-muted, #52625B); }
.gc-sublabel { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-muted, #52625B); }
.gc-input {
  display: block; width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--bg-linen, #F6F1E7); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 8px;
  font-size: 16px; line-height: 1.5; color: var(--ink-main, #1C2722);
  transition: border-color .2s ease, background-color .2s ease;
}
.gc-input::placeholder { color: rgba(82, 98, 91, .7); }
.gc-input:focus { outline: none; border-color: var(--bg-pine, #234B3E); background: var(--bg-paper, #FFFDF9); }
.gc-input-serif { font-family: var(--font-serif, "Lora", serif); font-size: 19px; font-weight: 600; }
.gc-textarea { resize: vertical; min-height: 76px; }
.gc-custom { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; animation: gc-rise .3s ease; }

.gc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-chips-starters { margin-top: 10px; }
.gc-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 13px;
  background: var(--bg-paper, #FFFDF9); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink-main, #1C2722); cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.gc-chip:hover { border-color: var(--bg-pine, #234B3E); transform: translateY(-1px); }
.gc-chip.is-active, .gc-chip.is-active:hover { background: var(--bg-pine, #234B3E); border-color: var(--bg-pine, #234B3E); color: var(--bg-paper, #FFFDF9); }
.gc-chip-season { border-color: rgba(184, 134, 53, .6); background: #FBF4E6; }
.gc-chip-season > span:first-child { color: var(--accent-brass, #B88635); }
.gc-chip-season.is-active > span:first-child { color: var(--gc-brass-soft); }

.gc-seals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gc-seal-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px;
  background: var(--bg-linen, #F6F1E7); border: 1.5px solid transparent; border-radius: 12px;
  font-size: 12px; font-weight: 600; color: var(--ink-muted, #52625B); cursor: pointer; line-height: 1.25; text-align: center;
  transition: border-color .2s ease, transform .2s ease;
}
.gc-seal-opt:hover { transform: translateY(-2px); }
.gc-seal-opt.is-active { border-color: var(--accent-wax, #BA4A36); background: var(--bg-paper, #FFFDF9); color: var(--ink-main, #1C2722); }
.gc-seal-opt.is-active .gc-seal-art { animation: gc-press .45s ease; }
.gc-seal-art { display: block; width: 44px; height: 44px; }

.gc-error { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: rgba(186, 74, 54, .08); border: 1px solid rgba(186, 74, 54, .28); color: #8F3323; font-size: 14px; font-weight: 500; }

.gc-btn-primary, .gc-btn-wax, .gc-btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 11px 18px;
  border-radius: 8px; font-size: 15px; font-weight: 700; text-align: center; cursor: pointer; text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.gc-btn-primary { border: 1px solid var(--bg-pine, #234B3E); background: var(--bg-pine, #234B3E); color: var(--bg-paper, #FFFDF9); box-shadow: 0 1px 3px rgba(28, 39, 34, .06); }
.gc-btn-primary:hover { background: var(--bg-pine-hover, #19382E); border-color: var(--bg-pine-hover, #19382E); color: var(--bg-paper, #FFFDF9); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(28, 39, 34, .09); }
.gc-btn-primary:disabled { opacity: .9; cursor: progress; transform: none; }
.gc-btn-inline { width: auto; display: inline-flex; }
.gc-btn-wax { border: 1px solid var(--accent-wax, #BA4A36); background: var(--accent-wax, #BA4A36); color: var(--bg-paper, #FFFDF9); }
.gc-btn-wax:hover { background: #A5402E; border-color: #A5402E; color: var(--bg-paper, #FFFDF9); transform: translateY(-1px); }
.gc-btn-ghost { border: 1px solid rgba(35, 75, 62, .3); background: transparent; color: var(--bg-pine, #234B3E); font-weight: 600; }
.gc-btn-ghost:hover { border-color: var(--bg-pine, #234B3E); background: var(--bg-paper, #FFFDF9); color: var(--bg-pine, #234B3E); }
.gc-btn-wax:disabled, .gc-btn-ghost:disabled { opacity: .7; cursor: progress; }
.gc-btn-dot {
  display: block; width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #D66A52, var(--accent-wax, #BA4A36) 55%, var(--gc-wax-deep));
  transition: transform .3s ease;
}
.gc-btn-primary:hover .gc-btn-dot { transform: rotate(-18deg) scale(1.08); }
.gc-btn-primary.is-busy .gc-btn-dot { animation: gc-press .6s ease infinite alternate; }
.gc-reassure { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--ink-muted, #52625B); }

/* ---------- Story preview ---------- */
.gc-preview { position: sticky; top: 92px; }
.gc-story {
  width: 100%; max-width: 330px; margin: 0 auto; aspect-ratio: 9 / 16; padding: 14px;
  background: var(--bg-pine, #234B3E); border-radius: 18px; box-shadow: 0 12px 32px rgba(28, 39, 34, .09);
  transform: rotate(1.5deg); transition: transform .4s ease;
}
.gc-story:hover { transform: rotate(0deg) translateY(-3px); }
.gc-story-inner {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 100%; padding: 20px 16px; text-align: center; overflow: hidden;
  background: var(--bg-linen, #F6F1E7); border-radius: 10px;
  outline: 1px solid rgba(184, 134, 53, .55); outline-offset: -8px;
}
.gc-story-inner::before, .gc-story-inner::after {
  content: ""; position: absolute; width: 34px; height: 34px; border: 2px solid var(--accent-brass, #B88635); pointer-events: none;
}
.gc-story-inner::before { left: 14px; top: 14px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.gc-story-inner::after { right: 14px; bottom: 14px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.gc-story-script { margin: 0; font-family: var(--font-hand, "Lora", Georgia, serif); font-style: italic; font-size: 19px; font-weight: 500; color: var(--accent-brass, #B88635); line-height: 1; }
.gc-story-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--ink-muted, #52625B); }
.gc-story-seal { display: block; width: 70px; height: 70px; margin: 8px 0 4px; }
.gc-story-title { margin: 0; max-width: 100%; font-family: var(--font-serif, "Lora", serif); font-size: 22px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.gc-story-host { margin: 0; font-size: 13px; color: var(--ink-muted, #52625B); }
.gc-story-prompt { margin: 4px 0; font-family: var(--font-serif, "Lora", serif); font-style: italic; font-size: 13px; line-height: 1.45; color: var(--ink-main, #1C2722); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gc-story-code { display: grid; gap: 2px; width: 100%; margin-top: 6px; padding: 10px 8px; border-radius: 8px; background: var(--bg-pine, #234B3E); color: var(--bg-paper, #FFFDF9); }
.gc-story-code span { font-size: 12px; color: var(--gc-brass-soft); overflow-wrap: anywhere; }
.gc-story-code b { font-size: 16px; letter-spacing: .1em; }
.gc-story-opens { margin: 6px 0 0; font-family: var(--font-hand, "Lora", Georgia, serif); font-style: italic; font-weight: 500; font-size: 17px; color: var(--accent-wax, #BA4A36); }
.gc-preview-note { max-width: 330px; margin: 14px auto 0; text-align: center; font-size: 13px; color: var(--ink-muted, #52625B); }

/* ---------- Join ---------- */
.gc-join-card {
  max-width: 560px; margin: 0 auto; padding: 34px 30px 28px; text-align: center;
  background: var(--bg-paper, #FFFDF9); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 12px; box-shadow: 0 12px 32px rgba(28, 39, 34, .09);
}
.gc-join-seal { display: block; width: 64px; height: 64px; margin: 0 auto 10px; }
.gc-join-title { margin: 0 0 6px; font-family: var(--font-serif, "Lora", serif); font-size: 26px; font-weight: 600; line-height: 1.25; }
.gc-join-sub { margin: 0 auto 18px; max-width: 42ch; color: var(--ink-muted, #52625B); }
.gc-code-input {
  display: block; width: 100%; min-height: 72px; margin-bottom: 14px; padding: 12px 14px;
  background: var(--bg-linen, #F6F1E7); border: 2px dashed rgba(35, 75, 62, .35); border-radius: 12px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 32px; font-weight: 700; letter-spacing: .14em; text-align: center; text-transform: uppercase;
  color: var(--bg-pine, #234B3E);
  transition: border-color .2s ease, background-color .2s ease;
}
.gc-code-input::placeholder { color: rgba(35, 75, 62, .22); }
.gc-code-input:focus { outline: none; border-style: solid; border-color: var(--bg-pine, #234B3E); background: var(--bg-paper, #FFFDF9); }

.gc-mine { margin-top: 22px; padding: 16px 18px; background: var(--bg-paper, #FFFDF9); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 12px; }
.gc-mine-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted, #52625B); }
.gc-mine-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.gc-mine-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; }
.gc-mine-item:hover { background: var(--bg-linen, #F6F1E7); }
.gc-mine-seal { width: 34px; height: 34px; flex: none; }
.gc-mine-name { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--font-serif, "Lora", serif); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-mine-meta { font-size: 13px; color: var(--ink-muted, #52625B); white-space: nowrap; }
.gc-mine-item .gc-chip { flex: none; }

/* ---------- Room ---------- */
.gc-room { animation: gc-rise .4s ease; }
.gc-room-loading, .gc-room-missing { max-width: 520px; margin: 0 auto; padding: 40px 20px; text-align: center; color: var(--ink-muted, #52625B); background: var(--bg-paper, #FFFDF9); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 12px; }
.gc-loading-seal { display: block; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent-wax, #BA4A36); animation: gc-glow 1.4s ease-in-out infinite; }
.gc-kicker { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-wax, #BA4A36); }
.gc-room-title { margin: 0 0 6px; font-family: var(--font-serif, "Lora", serif); font-size: 32px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.gc-room-title:focus { outline: none; }
.gc-room-head { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.gc-room-seal { display: block; width: 84px; height: 84px; flex: none; }
.gc-room-headcopy { min-width: 0; }
.gc-room-meta { margin: 0; color: var(--ink-muted, #52625B); font-size: 15px; }
.gc-room-prompt { margin: 10px 0 0; padding-left: 14px; border-left: 3px solid var(--accent-brass, #B88635); font-family: var(--font-serif, "Lora", serif); font-style: italic; font-size: 17px; overflow-wrap: anywhere; }

.gc-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 14px 18px; border-radius: 12px;
  background: var(--bg-pine, #234B3E); color: var(--bg-paper, #FFFDF9);
}
.gc-banner-text { margin: 0; font-weight: 600; font-size: 15px; }
.gc-banner-text b { font-family: var(--font-hand, "Lora", Georgia, serif); font-style: italic; font-size: 19px; font-weight: 500; color: var(--gc-brass-soft); margin-left: 4px; }
.gc-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: 6px; }
.gc-countdown div { display: grid; justify-items: center; min-width: 58px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 253, 249, .1); }
.gc-countdown b { font-family: var(--font-serif, "Lora", serif); font-size: 22px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gc-countdown span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 253, 249, .75); }
.gc-banner.is-open { background: var(--accent-wax, #BA4A36); }
.gc-banner.is-open .gc-banner-text { font-family: var(--font-serif, "Lora", serif); font-size: 20px; }

.gc-room-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.gc-room-main { display: grid; gap: 20px; }

.gc-box { padding: 22px; background: var(--bg-sage-tint, #EAEFE9); border: 1px solid rgba(35, 75, 62, .12); border-radius: 12px; }
.gc-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.gc-box-title { margin: 0; font-family: var(--font-serif, "Lora", serif); font-size: 22px; font-weight: 600; }
.gc-box-count { margin: 0; font-family: var(--font-hand, "Lora", Georgia, serif); font-style: italic; font-weight: 500; font-size: 19px; color: var(--bg-pine, #234B3E); }
.gc-envelopes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.gc-empty { margin: 0; padding: 22px; border: 1.5px dashed rgba(35, 75, 62, .3); border-radius: 12px; text-align: center; font-family: var(--font-serif, "Lora", serif); font-style: italic; color: var(--ink-muted, #52625B); }
.gc-whisper { min-height: 24px; margin: 12px 0 0; text-align: center; font-family: var(--font-hand, "Lora", Georgia, serif); font-style: italic; font-weight: 500; font-size: 18px; color: var(--accent-wax, #BA4A36); }

.gc-env-item { position: relative; }
.gc-env {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 11; padding: 0; cursor: pointer;
  background: var(--bg-paper, #FFFDF9); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 10px;
  box-shadow: 0 1px 3px rgba(28, 39, 34, .06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.gc-env:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: 0 12px 32px rgba(28, 39, 34, .09); }
.gc-env[data-paper="linen"] { background: #FBF7EF; }
.gc-env[data-paper="parchment"] { background: #F5ECD9; }
.gc-env[data-paper="botanical"] { background: #EEF2EC; }
.gc-env::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none;
  background:
    linear-gradient(to top right, transparent calc(50% - 1px), rgba(223, 216, 202, .95) 50%, transparent calc(50% + 1px)) left bottom / 50% 60% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 1px), rgba(223, 216, 202, .95) 50%, transparent calc(50% + 1px)) right bottom / 50% 60% no-repeat;
}
.gc-env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 54%; z-index: 1;
  background: linear-gradient(180deg, var(--gc-flap-deep), var(--gc-flap));
  clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 10px 10px 0 0;
  transform-origin: 50% 0; transition: transform .6s ease;
}
.gc-env-seal { position: absolute; left: 50%; top: 54%; z-index: 2; width: 40px; height: 40px; margin: -20px 0 0 -20px; transition: transform .3s ease; }
.gc-env-name { position: absolute; left: 6px; right: 6px; bottom: 6px; z-index: 2; margin: 0; font-family: var(--font-hand, "Lora", Georgia, serif); font-style: italic; font-size: 15px; font-weight: 500; line-height: 1.2; color: var(--bg-pine, #234B3E); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-env.is-new { animation: gc-drop .7s cubic-bezier(.3, 1.3, .5, 1) both; }
.gc-env.is-jiggle { animation: gc-jiggle .55s ease; }
.gc-env.is-open-able .gc-env-seal { animation: gc-breathe 2.4s ease-in-out infinite; }
.gc-env.is-open-able:hover .gc-env-flap { transform: perspective(500px) rotateX(35deg); }
.gc-env-remove {
  position: absolute; right: -6px; top: -6px; z-index: 3; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--border-paper, #DFD8CA); border-radius: 50%; background: var(--bg-paper, #FFFDF9);
  font-size: 16px; line-height: 1; color: var(--ink-muted, #52625B); cursor: pointer;
}
.gc-env-remove:hover, .gc-env-remove.is-armed { color: var(--bg-paper, #FFFDF9); background: var(--accent-wax, #BA4A36); border-color: var(--accent-wax, #BA4A36); }

/* Drop form */
.gc-drop { padding: 24px; background: var(--bg-paper, #FFFDF9); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 12px; box-shadow: 0 12px 32px rgba(28, 39, 34, .09); }
.gc-drop-script { margin: 0; font-family: var(--font-hand, "Lora", Georgia, serif); font-style: italic; font-size: 19px; font-weight: 500; color: var(--accent-wax, #BA4A36); line-height: 1.1; }
.gc-drop-title { margin: 0 0 4px; font-family: var(--font-serif, "Lora", serif); font-size: 24px; font-weight: 600; }
.gc-drop-sub { margin: 0 0 16px; font-size: 14px; color: var(--ink-muted, #52625B); }
.gc-note-body { min-height: 130px; font-family: var(--font-serif, "Lora", serif); font-size: 17px; line-height: 1.65; }
.gc-note-count { margin: 6px 0 0; text-align: right; font-size: 12px; color: var(--ink-muted, #52625B); font-variant-numeric: tabular-nums; }
.gc-drop-options { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-bottom: 18px; }
.gc-papers, .gc-mini-seals { display: flex; gap: 8px; }
.gc-paper-dot { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(28, 39, 34, .18); cursor: pointer; transition: transform .2s ease; }
.gc-paper-dot[data-gc-paper="linen"] { background: #F6F1E7; }
.gc-paper-dot[data-gc-paper="cream"] { background: #FFFDF9; }
.gc-paper-dot[data-gc-paper="parchment"] { background: #EBDDBF; }
.gc-paper-dot[data-gc-paper="botanical"] { background: #DCE6DD; }
.gc-paper-dot:hover { transform: scale(1.1); }
.gc-paper-dot.is-active { border-color: var(--bg-pine, #234B3E); outline: 2px solid var(--bg-paper, #FFFDF9); outline-offset: -5px; }
.gc-mini-seal { width: 40px; height: 40px; padding: 2px; border: 1.5px solid transparent; border-radius: 50%; background: none; cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
.gc-mini-seal span { display: block; width: 100%; height: 100%; }
.gc-mini-seal:hover { transform: scale(1.08); }
.gc-mini-seal.is-active { border-color: var(--accent-wax, #BA4A36); }

/* Share panel */
.gc-share {
  position: sticky; top: 92px; display: grid; gap: 10px; padding: 22px;
  background: var(--bg-paper, #FFFDF9); border: 1px solid var(--border-paper, #DFD8CA); border-radius: 12px; box-shadow: 0 1px 3px rgba(28, 39, 34, .06);
}
.gc-share-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted, #52625B); }
.gc-share-code {
  margin: 0 0 4px; padding: 14px 8px; border-radius: 8px; background: var(--bg-linen, #F6F1E7); border: 2px dashed rgba(35, 75, 62, .3);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 26px; font-weight: 700; letter-spacing: .12em; text-align: center; color: var(--bg-pine, #234B3E);
  overflow-wrap: anywhere; user-select: all;
}
.gc-share-hint { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-muted, #52625B); overflow-wrap: anywhere; }
.gc-share-hint b { color: var(--ink-main, #1C2722); }
.gc-story-thumb { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px; border-radius: 8px; background: var(--bg-linen, #F6F1E7); animation: gc-rise .4s ease; }
.gc-story-img-slot { display: block; flex: none; }
.gc-story-img-slot:empty { display: none; }
.gc-story-thumb img { display: block; width: 64px; height: auto; border-radius: 6px; }
.gc-story-thumb figcaption { font-size: 13px; color: var(--ink-muted, #52625B); }
.gc-host-tools { display: grid; gap: 8px; padding-top: 12px; border-top: 1px dashed rgba(35, 75, 62, .2); }
.gc-share-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 6px; }
.gc-textlink { padding: 4px 2px; border: 0; background: none; font-size: 13px; font-weight: 500; color: var(--ink-muted, #52625B); text-decoration: underline; text-decoration-color: rgba(82, 98, 91, .4); text-underline-offset: 3px; cursor: pointer; }
.gc-textlink:hover { color: var(--bg-pine, #234B3E); }
.gc-textlink:disabled { cursor: default; text-decoration: none; }

/* ---------- Note modal ---------- */
.gc-modal { width: min(600px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink-main, #1C2722); overflow: visible; }
.gc-modal::backdrop { background: rgba(28, 39, 34, .5); }
.gc-modal[open] .gc-note-sheet { animation: gc-unfold .8s cubic-bezier(.2, .8, .2, 1) both; }
.gc-modal-inner { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
.gc-modal-close { position: absolute; right: 10px; top: 10px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg-paper, #FFFDF9); font-size: 24px; line-height: 1; color: var(--ink-muted, #52625B); cursor: pointer; }
.gc-modal-close:hover { color: var(--accent-wax, #BA4A36); }
.gc-note-sheet {
  display: grid; justify-items: center; padding: 38px 36px 30px;
  background: #FBF7EF; border: 1px solid var(--border-paper, #DFD8CA); border-radius: 12px; box-shadow: 0 12px 32px rgba(28, 39, 34, .09);
  transform-origin: 50% 0;
}
.gc-note-sheet[data-paper="cream"] { background: var(--bg-paper, #FFFDF9); }
.gc-note-sheet[data-paper="parchment"] { background: #F5ECD9; }
.gc-note-sheet[data-paper="botanical"] { background: #EEF2EC; }
.gc-note-seal { display: block; width: 60px; height: 60px; margin-bottom: 10px; }
.gc-note-meta { margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted, #52625B); text-align: center; }
.gc-note-text { justify-self: stretch; font-family: var(--font-serif, "Lora", serif); font-size: 18px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.gc-note-from { justify-self: end; margin: 20px 0 0; font-family: var(--font-hand, "Lora", Georgia, serif); font-style: italic; font-size: 24px; font-weight: 500; color: var(--bg-pine, #234B3E); }

/* ---------- Toast ---------- */
.gc-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 8px; background: var(--ink-main, #1C2722); color: var(--bg-paper, #FFFDF9);
  font-size: 14px; font-weight: 500; text-align: center; box-shadow: 0 12px 32px rgba(28, 39, 34, .09);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.gc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Keyframes ---------- */
@keyframes gc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes gc-press { 0% { transform: scale(1); } 40% { transform: scale(.86); } 100% { transform: scale(1); } }
@keyframes gc-glow { 0%, 100% { opacity: .5; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes gc-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes gc-jiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-4deg); } 40% { transform: rotate(3.5deg); } 60% { transform: rotate(-2.5deg); } 80% { transform: rotate(1.5deg); } }
@keyframes gc-drop { 0% { opacity: 0; transform: translateY(-36px) rotate(-6deg) scale(.9); } 70% { opacity: 1; transform: translateY(4px) rotate(1deg); } 100% { transform: none; } }
@keyframes gc-unfold { 0% { opacity: 0; transform: perspective(900px) rotateX(-28deg) translateY(-10px); clip-path: inset(0 0 70% 0); } 100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gc-create { grid-template-columns: minmax(0, 1fr); }
  .gc-preview { position: static; }
  .gc-room-grid { grid-template-columns: minmax(0, 1fr); }
  .gc-share { position: static; order: -1; }
}

@media (max-width: 640px) {
  .gc-tabs { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gc-tab { justify-content: center; padding: 8px 8px; font-size: 13px; line-height: 1.3; text-align: left; }
  .gc-tab-num { display: none; }
  .gc-form, .gc-drop { padding: 18px 16px; }
  .gc-chip { flex: 1 1 auto; justify-content: center; }
  .gc-chip-season { flex-basis: 100%; }
  .gc-chips-starters .gc-chip { flex: 0 1 auto; }
  .gc-custom { grid-template-columns: minmax(0, 1fr); }
  .gc-story { max-width: 260px; }
  .gc-story-title { font-size: 19px; }
  .gc-join-card { padding: 26px 16px 22px; }
  .gc-join-title { font-size: 22px; }
  .gc-code-input { font-size: 24px; letter-spacing: .08em; min-height: 64px; }
  .gc-room-head { align-items: flex-start; gap: 14px; }
  .gc-room-seal { width: 60px; height: 60px; }
  .gc-room-title { font-size: 25px; }
  .gc-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .gc-countdown { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gc-countdown div { min-width: 0; }
  .gc-box { padding: 16px 12px; }
  .gc-envelopes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gc-share { padding: 18px 16px; }
  .gc-share-code { font-size: 22px; letter-spacing: .08em; }
  .gc-btn-inline { width: 100%; }
  .gc-mine-item { flex-wrap: wrap; }
  .gc-mine-meta { white-space: normal; }
  .gc-note-sheet { padding: 30px 18px 22px; }
  .gc-note-text { font-size: 17px; }
}

@media (max-width: 380px) {
  .gc-seals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gc-drop-options { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .gc *, .gc *::before, .gc *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
