/* P13-T019 v0.3 あかちゃんを なきやませろ！（ごまの おうち）。スマホの たてが 先。絵は 揺らさない */
.gm { position: relative; max-width: 1100px; margin: 0 auto; padding: 8px 0 12px; }
.gm-top { display: flex; align-items: center; gap: 12px; padding: 6px 14px; font-weight: 700; }
.gm-clock { font-size: 1.15rem; color: var(--ink); min-width: 6.5em; }
.gm-meter { position: relative; flex: 1; height: 18px; border-radius: 999px; background: #efe3cf; overflow: hidden; }
.gm-meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: #9cc59a; transition: width .2s linear, background .3s; }
.gm-meter i.mid { background: #f0b45a; }
.gm-meter i.hi { background: #e0604c; }
.gm-meter b { position: absolute; inset: 0; text-align: center; font-size: .7rem; line-height: 18px; color: rgba(74, 59, 47, .75); }
.gm-snd { font-size: 1.3rem; background: none; border: 0; cursor: pointer; }

.gm-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; border-radius: 18px; scrollbar-width: none; }
.gm-wrap::-webkit-scrollbar { display: none; }
.gm-scene { position: relative; width: 100%; aspect-ratio: 3 / 2; --night: 0; user-select: none; -webkit-user-select: none; }
.gm-room { position: absolute; inset: 0; width: 100%; height: 100%; }
.gm-night { position: absolute; inset: 0; pointer-events: none; background: rgb(18, 24, 60); opacity: var(--night); transition: opacity 1.2s; z-index: 6; mix-blend-mode: multiply; }
.gm-scene.is-morning .gm-night { opacity: 0; }
.gm-scene.is-morning { filter: saturate(1.1) brightness(1.08); transition: filter 1.5s; }

.gm-spot { position: absolute; z-index: 2; background: transparent; border: 2px solid transparent; border-radius: 14px; cursor: pointer; padding: 0; }
.gm-spot span { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); white-space: nowrap; font-size: .7rem; font-weight: 700;
  color: #fff; background: rgba(74, 59, 47, .8); border-radius: 999px; padding: 1px 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.gm-spot:hover, .gm-spot:focus-visible { border-color: rgba(255, 236, 170, .9); box-shadow: 0 0 14px rgba(255, 220, 140, .7) inset; }
.gm-spot:hover span, .gm-spot:focus-visible span { opacity: 1; }
.gm-scene.hints .gm-spot span { opacity: .9; }

.gm-baby { position: absolute; z-index: 3; padding: 0; border: 0; background: none; cursor: pointer; aspect-ratio: 1 / 1.2; }
.gm-baby img { position: absolute; left: 0; top: 0; width: 100%; opacity: 0; transition: opacity .35s; pointer-events: none; }
.gm-baby[data-state="cry"] .b-cry, .gm-baby[data-state="smile"] .b-smile, .gm-baby[data-state="sleep"] .b-sleep { opacity: 1; }
.gm-scene[data-baby^="hug"] .gm-baby { visibility: hidden; }
.gm-rim { position: absolute; z-index: 4; pointer-events: none; }
.gm-bunny-bed { position: absolute; z-index: 3; width: 3.2%; border-radius: 40%; opacity: 0; transition: opacity .4s; pointer-events: none; }
.gm-scene.bunny-in-bed .gm-bunny-bed { opacity: 1; }

.gm-zzz, .gm-wah { position: absolute; z-index: 5; font-weight: 700; pointer-events: none; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.gm-zzz { color: #3d5590; font-size: clamp(.8rem, 1.6vw, 1.3rem); text-shadow: 0 1px 0 #fff; }
.gm-wah { color: #c8463b; font-size: clamp(.8rem, 1.8vw, 1.5rem); text-shadow: 0 2px 0 #fff, 0 0 6px #fff; }
.gm-scene[data-baby="sleep"] .gm-zzz, .gm-scene[data-baby="hugsleep"] .gm-zzz { opacity: 1; animation: gm-zz 2.4s ease-in-out infinite; }
.gm-scene[data-baby="cry"] .gm-wah, .gm-scene[data-baby="hugcry"] .gm-wah { opacity: 1; }
@keyframes gm-zz { 50% { transform: translateY(-6px); opacity: .6; } }

.gm-goma { position: absolute; z-index: 5; width: 12%; transform: translate(-50%, -100%); transition-property: left, top; transition-timing-function: ease-in-out; pointer-events: none; }
.gm-goma img { width: 100%; display: block; }
.gm-goma .g-hug { display: none; width: 118%; margin-left: -9%; }
.gm-goma.hug .g-stand { display: none; }
.gm-goma.hug .g-hug { display: block; }
.gm-goma.flip img { transform: scaleX(-1); }

.gm-ui { padding: 10px 12px 0; }
.gm-hand { display: flex; gap: 8px; margin-bottom: 8px; }
.gm-slot { display: flex; align-items: center; gap: 6px; flex: 1; min-height: 46px; padding: 4px 8px; border: 2px dashed var(--line); border-radius: 12px; font-size: .8rem; color: var(--ink-soft); background: var(--card); }
.gm-slot.on { border-style: solid; border-color: var(--accent); color: var(--ink); }
.gm-slot.hug { border-color: #3f7a5c; }
.gm-slot img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; }
.gm-msg { min-height: 3.4em; margin: 0 0 8px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); line-height: 1.6; }
.gm-msg.cry { border-color: #e0a090; }
.gm-msg.ok { border-color: #9cc59a; }
.gm-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-btn { flex: 1 1 calc(50% - 8px); min-height: 48px; font: inherit; font-weight: 700; font-size: .95rem; padding: 8px 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.gm-btn:active { transform: scale(.97); }
.gm-btn:disabled { opacity: .4; }
.gm-btn.sub { flex-basis: 100%; color: var(--ink-soft); }
.gm-btn.gm-put { flex-basis: 100%; position: relative; overflow: hidden; touch-action: none; border-color: #3f7a5c; }
.gm-btn.gm-put::after { content: ""; position: absolute; inset: 0 100% 0 0; background: rgba(63, 122, 92, .25); }
.gm-btn.gm-put.hold::after { inset: 0; transition: inset 1.4s linear; }

.gm-panel { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 18px;
  background: rgba(251, 245, 234, .94); border-radius: 18px; }
.gm-panel[hidden] { display: none; }
.gm-panel h1 { font-size: 1.6rem; }
.gm-panel h1 .en { display: block; font-size: .6em; font-weight: 500; color: var(--ink-soft); }
.gm-tips { font-size: .9rem; color: var(--ink-soft); }
.gm-panel .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 1.05rem; padding: 12px 28px; }
.gm-end-t { font-size: 1.4rem; font-weight: 700; }
.gm-res { font-size: 1.1rem; }
.gm-share { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gm-share a, .gm-share button { font: inherit; font-weight: 700; font-size: .9rem; padding: 9px 16px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; }
.gm-x { background: #111; color: #fff; }
.gm-sh { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); color: #fff; }

/* スマホ: 絵を 画面の はばより 大きく して、左右に うごかして 見る */
@media (max-width: 760px) {
  .gm-scene { width: 175%; }
  .gm-spot span { font-size: .62rem; }
  .gm-wrap { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .gm-goma { transition-duration: 0ms !important; } .gm-zzz { animation: none !important; } }
.gm-slot.on:not(.hug) { cursor: pointer; }
.gm-slot.on:not(.hug)::after { content: "おく"; margin-left: auto; font-size: .7rem; color: var(--accent-dark); font-weight: 700; }
/* だっこ ちゅうは しるしを にいにの ところに */
.gm-goma .g-wah, .gm-goma .g-zzz { position: absolute; left: 62%; top: 8%; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .3s; }
.gm-goma .g-wah { color: #c8463b; font-size: clamp(.8rem, 1.8vw, 1.5rem); text-shadow: 0 2px 0 #fff, 0 0 6px #fff; }
.gm-goma .g-zzz { color: #3d5590; font-size: clamp(.8rem, 1.6vw, 1.3rem); text-shadow: 0 1px 0 #fff; }
.gm-scene[data-baby="hugcry"] .g-wah, .gm-scene[data-baby="hugsleep"] .g-zzz { opacity: 1; }
.gm-scene[data-baby="hugcry"] .gm-wah, .gm-scene[data-baby="hugsleep"] .gm-zzz { opacity: 0; }
.gm-goma.flip .g-wah, .gm-goma.flip .g-zzz { transform: none; }
/* パソコンでは 絵と ボタンが 1画面に おさまるように */
.gm { max-width: min(1100px, calc((100dvh - 250px) * 1.5)); min-width: min(100%, 720px); }

/* ===== v1.0 ===== */
.gm-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 14px 6px; font-weight: 700; color: var(--accent-dark); min-height: 1.6em; }
.gm-quit { font: inherit; font-size: .8rem; font-weight: 700; color: var(--ink-soft); background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 2px 12px; cursor: pointer; }
.gm-curtain, .gm-chair { position: absolute; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .6s; }
.gm-scene.curtain-closed .gm-curtain { opacity: 1; }
.gm-scene.bunny-taken .gm-chair, .gm-scene.bunny-in-bed .gm-chair { opacity: 1; }
.gm-bunny-bed { width: 3.4%; border-radius: 0; }
.gm-wind { position: absolute; z-index: 5; font-size: clamp(.9rem, 2vw, 1.6rem); opacity: 0; transition: opacity .4s; pointer-events: none; }
.gm-scene.window-open .gm-wind { opacity: .9; animation: gm-zz 2.8s ease-in-out infinite; }
.gm-bathbaby, .gm-tubrim, .gm-bubbles { position: absolute; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .4s; }
.gm-bathbaby { z-index: 3; }
.gm-bubbles { z-index: 5; font-weight: 700; color: #3d6f8a; font-size: clamp(.75rem, 1.6vw, 1.2rem); text-shadow: 0 1px 0 #fff, 0 0 6px #fff; white-space: nowrap; }
.gm-scene.bathing .gm-bathbaby, .gm-scene.bathing .gm-tubrim, .gm-scene.bathing .gm-bubbles { opacity: 1; }
.gm-scene[data-baby="bath"] .gm-goma .g-hug, .gm-scene[data-baby="bath"] .gm-goma .g-hugcry { display: none; }
.gm-scene[data-baby="bath"] .gm-goma .g-stand { display: block !important; }
.gm-scene[data-baby="bath"] .gm-baby, .gm-scene[data-baby="walk"] .gm-baby { visibility: hidden; }
.gm-goma .g-hugcry, .gm-goma .g-lie { display: none; }
.gm-scene[data-baby="hugcry"] .gm-goma.hug .g-hug { display: none; }
.gm-scene[data-baby="hugcry"] .gm-goma.hug .g-hugcry { display: block; width: 118%; margin-left: -9%; }
.gm-goma.lie .g-stand, .gm-goma.lie .g-hug, .gm-goma.lie .g-hugcry { display: none !important; }
.gm-goma.lie .g-lie { display: block; width: 210%; margin-left: -55%; }
.gm-goma.lie .g-wah { left: 40%; top: -10%; }
.gm-goma.out { opacity: 0; transition: opacity .8s, left .8s, top .8s; }
.gm-flash { position: absolute; inset: 0; z-index: 7; pointer-events: none; background: #fff; opacity: 0; }
.gm-scene.thunder .gm-flash { animation: gm-flash .9s ease-out; }
@keyframes gm-flash { 0% { opacity: 0; } 12% { opacity: .35; } 100% { opacity: 0; } }
.gm-nights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 560px; margin: 8px auto; }
.gm-nbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 2px solid var(--accent); background: var(--card); font: inherit; cursor: pointer; color: var(--ink); }
.gm-nbtn b { font-size: 1.3rem; color: var(--accent-dark); line-height: 1.1; }
.gm-nbtn span { font-size: .78rem; font-weight: 700; line-height: 1.3; }
.gm-nbtn i { font-style: normal; font-size: .8rem; color: #e0a020; letter-spacing: .05em; }
.gm-nbtn.lock { border-color: var(--line); opacity: .55; cursor: default; }
.gm-nbtn.daily { border-color: #3f7a5c; }
.gm-how { font-size: .92rem; max-width: 620px; }
.gm-stars { font-size: 2rem; color: #e0a020; letter-spacing: .1em; }
.gm-diary { max-width: 520px; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: .95rem; }
.gm-diary a { color: var(--accent-dark); font-weight: 700; font-size: .88rem; }
.gm-endbtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gm-again, .gm-home { font: inherit; font-weight: 700; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--accent); background: var(--card); color: var(--accent-dark); cursor: pointer; }
.gm-panel { overflow-y: auto; justify-content: flex-start; padding-top: 18px; }
.gm-panel h1 { font-size: 1.5rem; margin-top: 4px; }
@media (max-width: 760px) {
  .gm-nights { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .gm-nbtn span { font-size: .68rem; }
  .gm-how { font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) { .gm-scene.thunder .gm-flash { animation: none; } .gm-scene.window-open .gm-wind { animation: none; } }
.gm-goma img { max-width: none; }
.gm-mode { display: inline-block; margin: 4px 6px 0; padding: 0 12px; border-radius: 999px; background: #3f7a5c; color: #fff; font-size: .7em; }
.gm-other a { font-size: .85rem; font-weight: 700; color: var(--accent-dark); }
.gm-hint-note { display: block; font-size: .8rem; color: var(--ink-soft); }
