/* How Does Gus Feel? — scoped to .g-feel */
.g-feel .gf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.g-feel .gf-tabs { flex-wrap: wrap; border-radius: 24px; }
.g-feel .gf-tabs button { min-height: 44px; }
.g-feel .gf-view.is-in { animation: gfIn .35s ease both; }
@keyframes gfIn { from { opacity: 0; transform: translateY(8px); } }

/* ---- two-column game layout ---- */
.g-feel .gf-quiz, .g-feel .gf-today { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 28px; align-items: center; }
.g-feel .gf-left { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.g-feel .gf-right { min-width: 0; }
@media (max-width: 760px) {
  .g-feel .gf-quiz, .g-feel .gf-today { grid-template-columns: 1fr; gap: 14px; }
}

/* ---- Gus stage ---- */
.g-feel .gf-stage {
  --mood: #cfc3c6; position: relative; width: 100%; max-width: 300px; height: clamp(170px, 34vw, 330px);
  display: grid; place-items: center;
}
.g-feel .gf-halo {
  position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%; left: 7%; top: 50%; transform: translateY(-50%);
  background: var(--mood); opacity: .28; filter: blur(2px); transition: background .5s, opacity .5s;
  box-shadow: 0 0 0 14px rgba(255, 255, 255, .7) inset;
}
.g-feel .gf-stage.is-wonder .gf-halo { background: repeating-conic-gradient(from 0deg, #ffd9e6 0 30deg, #fff0b8 0 60deg, #d2f4e4 0 90deg, #dfe6ff 0 120deg); opacity: .5; }
.g-feel .gf-gus {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain;
  opacity: 0; transition: opacity .45s ease, filter .45s ease; filter: drop-shadow(0 10px 12px rgba(60, 30, 35, .2));
}
.g-feel .gf-gus.is-on { opacity: 1; }
.g-feel .gf-stage.is-wonder .gf-gus { filter: grayscale(1) brightness(1.12) contrast(.9) drop-shadow(0 10px 12px rgba(60, 30, 35, .15)); }
.g-feel .gf-q {
  position: absolute; top: 4%; right: 8%; width: 54px; height: 54px; border-radius: 50%; background: #fff; color: var(--berry);
  font-family: var(--head); font-weight: 700; font-size: 2rem; display: grid; place-items: center; box-shadow: var(--shadow-sm);
  opacity: 0; transform: scale(.4); transition: opacity .3s, transform .4s cubic-bezier(.2, 1.6, .4, 1);
}
.g-feel .gf-stage.is-wonder .gf-q { opacity: 1; transform: none; animation: gfBob 2.4s ease-in-out infinite; }
.g-feel .gf-stage.is-bounce .gf-gus.is-on { animation: gfBounce .7s cubic-bezier(.2, 1.4, .4, 1); }
.g-feel .gf-stage.is-bounce .gf-halo { animation: gfHalo .7s ease; }
.g-feel .gf-stage.is-in-breath .gf-gus.is-on { transform: scale(1.12); transition: transform 3.8s ease-in-out, opacity .45s; }
.g-feel .gf-stage.is-out-breath .gf-gus.is-on { transform: scale(.94); transition: transform 3.8s ease-in-out, opacity .45s; }
.g-feel .gf-stage.is-in-breath .gf-halo { transform: translateY(-50%) scale(1.15); transition: transform 3.8s ease-in-out; }
.g-feel .gf-stage.is-out-breath .gf-halo { transform: translateY(-50%) scale(.9); transition: transform 3.8s ease-in-out; }
@keyframes gfBounce { 0% { transform: scale(.85, 1.1); } 35% { transform: scale(1.12, .9) translateY(4%); } 60% { transform: scale(.96, 1.05) translateY(-6%); } 100% { transform: none; } }
@keyframes gfHalo { 0% { transform: translateY(-50%) scale(.7); opacity: .1; } 60% { transform: translateY(-50%) scale(1.08); } }
@keyframes gfBob { 50% { transform: translateY(-6px) rotate(8deg); } }

/* progress dots */
.g-feel .gf-dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.g-feel .gf-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--line); transition: transform .3s, background .3s; }
.g-feel .gf-dot.is-now { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--berry); }
.g-feel .gf-dot.is-done { background: var(--mood, var(--berry)); transform: scale(1.15); }

/* ---- scenario card ---- */
.g-feel .gf-scene {
  display: flex; align-items: center; gap: 14px; background: var(--cream); border-radius: 22px; padding: 16px 16px 16px 14px;
  box-shadow: inset 0 0 0 3px var(--line); margin-bottom: 16px;
}
.g-feel .gf-scene.is-in { animation: gfIn .4s ease both; }
.g-feel .gf-emoji { font-size: clamp(2.6rem, 7vw, 3.6rem); line-height: 1; flex-shrink: 0; width: 1.3em; text-align: center; }
.g-feel .gf-scene-words { flex: 1; min-width: 0; }
.g-feel .gf-scene-text { font-family: var(--head); font-weight: 600; font-size: clamp(1.25rem, 3.2vw, 1.7rem); line-height: 1.25; margin: 0 0 4px; }
.g-feel .gf-ask { margin: 0; color: var(--berry); font-family: var(--head); font-weight: 600; font-size: 1.05rem; }
.g-feel .gf-speak { flex-shrink: 0; width: 52px; height: 52px; background: #fff; font-size: 1.5rem; }

/* ---- feeling buttons ---- */
.g-feel .gf-choices { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 12px; }
.g-feel .gf-choices[data-count="3"] { --cols: 3; }
@media (max-width: 520px) { .g-feel .gf-choices[data-count="4"] { --cols: 2; } }
.g-feel .gf-feel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 14px 0; }
@media (max-width: 400px) { .g-feel .gf-feel-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
.g-feel .gf-choice {
  --mood: #ccc; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px;
  min-height: 132px; padding: 10px 6px 10px; border: 0; border-radius: 22px; cursor: pointer; font: inherit; color: var(--ink);
  background: #fff; box-shadow: inset 0 0 0 3px var(--line), 0 5px 0 var(--line);
  transition: transform .18s, box-shadow .18s, opacity .25s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; overflow: hidden;
}
.g-feel .gf-choice::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 64%; background: var(--mood); opacity: .22; border-radius: 0 0 50% 50% / 0 0 22% 22%; }
.g-feel .gf-choice-pic { position: relative; height: 86px; display: grid; place-items: center; }
.g-feel .gf-choice-pic img { height: 86px; width: auto; filter: drop-shadow(0 4px 4px rgba(60, 30, 35, .18)); transition: transform .25s; pointer-events: none; }
.g-feel .gf-choice-word { position: relative; font-family: var(--head); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.g-feel .gf-choice:hover:not(:disabled) { transform: translateY(-3px); box-shadow: inset 0 0 0 3px var(--mood), 0 7px 0 var(--line); }
.g-feel .gf-choice:hover:not(:disabled) img { transform: rotate(-5deg) scale(1.05); }
.g-feel .gf-choice:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 0 0 3px var(--mood), 0 2px 0 var(--line); }
.g-feel .gf-choice.is-rainbow:hover:not(:disabled) { box-shadow: inset 0 0 0 3px var(--gold), 0 7px 0 var(--line); }
.g-feel .gf-choice.is-rainbow::before { background: linear-gradient(90deg, #ff5f6d, #ffc94d, #3fbf7f, #5a7dff, #a45cff); }
.g-feel .gf-choice[aria-pressed="true"] { box-shadow: inset 0 0 0 4px var(--berry), 0 5px 0 var(--berry-dark); }
.g-feel .gf-choice[aria-pressed="true"]::before { opacity: .42; }
.g-feel .gf-choice:disabled { cursor: default; }
.g-feel .gf-choice.is-try { opacity: .45; transform: scale(.96); }
.g-feel .gf-choice:disabled:not(.is-right):not(.is-try) { opacity: .4; }
.g-feel .gf-choice.is-right { box-shadow: inset 0 0 0 4px var(--mint-dark), 0 5px 0 #146343; animation: gfYes .6s cubic-bezier(.2, 1.5, .4, 1); }
.g-feel .gf-choice.is-right::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--mint-dark); color: #fff; font-weight: 900; display: grid; place-items: center; }
@keyframes gfYes { 40% { transform: scale(1.08) rotate(-2deg); } }
@media (max-width: 400px) {
  .g-feel .gf-choice { min-height: 112px; border-radius: 18px; }
  .g-feel .gf-choice-pic, .g-feel .gf-choice-pic img { height: 70px; }
  .g-feel .gf-choice-word { font-size: 1rem; }
}

/* message + next */
.g-feel .gf-msgrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 16px; min-height: 56px; }
.g-feel .gf-msg { margin: 0; font-family: var(--head); font-weight: 600; font-size: 1.2rem; flex: 1 1 220px; }
.g-feel .gf-msg.is-good { color: var(--mint-dark); animation: gfIn .3s ease; }
.g-feel .gf-msg.is-hmm { color: #7046b8; animation: gfIn .3s ease; }
.g-feel .gf-next { flex-shrink: 0; }
.g-feel .gf-next[hidden] { display: none; }
@media (max-width: 560px) {
  .g-feel .game-bar { justify-content: center; }
  .g-feel .gf-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .g-feel .gf-tabs button { padding: 6px 6px; font-size: .88rem; line-height: 1.15; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .g-feel .gf-tabs button span { font-size: 1.15rem; }
  .g-feel .gf-scene { padding: 12px; gap: 10px; }
}

/* ---- today ---- */
.g-feel .gf-today-title { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 4px; color: var(--berry); }
.g-feel .gf-today-sub { margin: 0; color: var(--ink-soft); font-weight: 700; }
.g-feel .gf-tip { --mood: var(--berry); position: relative; background: #fff; border-radius: 22px; padding: 16px 18px 18px; box-shadow: inset 0 0 0 3px var(--mood), var(--shadow-sm); }
.g-feel .gf-tip.is-rainbow { box-shadow: inset 0 0 0 3px var(--gold), var(--shadow-sm); }
.g-feel .gf-tip.is-in { animation: gfIn .35s ease both; }
.g-feel .gf-tip-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.g-feel .gf-tip-title { margin: 0; font-size: 1.35rem; }
.g-feel .gf-tip-text { margin: 8px 0 0; font-size: 1.15rem; font-weight: 700; line-height: 1.45; }
.g-feel .gf-breathe-btn { margin-top: 12px; min-height: 46px; }
.g-feel .gf-breathe-btn[hidden] { display: none; }
.g-feel .gf-note { margin: 12px 0 0; font-size: .88rem; color: var(--ink-soft); }

/* ---- chart ---- */
.g-feel .gf-chart { background: linear-gradient(180deg, #fff, var(--cream)); border-radius: 22px; padding: 18px 14px 14px; }
.g-feel .gf-chart-head { text-align: center; margin-bottom: 16px; }
.g-feel .gf-chart-head h2 { color: var(--berry); margin: 0 0 4px; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.g-feel .gf-chart-head p { margin: 0 auto; max-width: 34em; color: var(--ink-soft); font-weight: 700; }
.g-feel .gf-chart-grid { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 760px; }
.g-feel .gf-chart-tile { flex: 0 0 calc(25% - 10.5px); min-width: 140px; }
@media (max-width: 400px) { .g-feel .gf-chart-grid { gap: 10px; } .g-feel .gf-chart-tile { flex-basis: calc(50% - 5px); min-width: 0; } }
.g-feel .gf-chart-tile {
  --mood: #ccc; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #fff; border-radius: 22px; padding: 14px 10px 16px; box-shadow: inset 0 0 0 3px var(--line); overflow: hidden; break-inside: avoid;
}
.g-feel .gf-chart-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 60%; background: var(--mood); opacity: .25; border-radius: 0 0 50% 50% / 0 0 20% 20%; }
.g-feel .gf-chart-tile.is-rainbow::before, .g-feel .gf-chart-tile.is-rainbow .gf-swatch { background: linear-gradient(90deg, #ff5f6d, #ffc94d, #3fbf7f, #5a7dff, #a45cff); }
.g-feel .gf-chart-pic { position: relative; height: 120px; display: grid; place-items: center; }
.g-feel .gf-chart-pic img { height: 120px; width: auto; filter: drop-shadow(0 5px 6px rgba(60, 30, 35, .18)); }
.g-feel .gf-chart-feel { position: relative; font-family: var(--head); font-size: 1.35rem; margin-top: 6px; }
.g-feel .gf-chart-flavor { position: relative; color: var(--ink-soft); font-weight: 700; font-size: .95rem; }
.g-feel .gf-swatch { position: relative; width: 60%; height: 10px; border-radius: 99px; background: var(--mood); margin-top: 8px; }
.g-feel .gf-chart-tile .gf-speak { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; font-size: 1.15rem; }
.g-feel .gf-chart-foot { text-align: center; margin: 16px 0 0; font-family: var(--head); font-weight: 600; color: var(--berry-dark); }


/* ---- print: only the feelings chart (when the chart view is open) ---- */
@media print {
  html.gf-print-chart body * { visibility: hidden !important; }
  html.gf-print-chart .g-feel .gf-chart, html.gf-print-chart .g-feel .gf-chart * { visibility: visible !important; }
  html.gf-print-chart .g-feel.game-root { position: static !important; box-shadow: none !important; }
  html.gf-print-chart main > :not(.g-feel):not(:has(.g-feel)) { display: none !important; }
  html.gf-print-chart .g-feel > :not(.gf-view) { display: none !important; }
  html.gf-print-chart .g-feel .gf-chart { position: absolute; left: 0; top: 0; width: 100%; background: #fff; }
  .g-feel .gf-view { animation: none !important; }
  .g-feel .gf-chart-grid { max-width: none; }
  .g-feel .gf-chart-tile { flex-basis: calc(25% - 10.5px) !important; min-width: 0; }
  .g-feel .gf-chart-tile { box-shadow: none !important; border: 2pt solid #ddd; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .g-feel .gf-chart-tile::before, .g-feel .gf-swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .g-feel .gf-speak { display: none !important; }
}

/* chart tiles open that feeling */
.g-feel .gf-chart-tile.is-tappable { cursor: pointer; transition: transform .2s, box-shadow .2s; }
.g-feel .gf-chart-tile.is-tappable:hover { transform: translateY(-4px); }

