/* P13-T019 その2「はやわざ」。スマホの たて画面が 先。絵は 揺らさない */
.ng { padding: 12px 12px 8px; max-width: 540px; margin: 0 auto; }
.ng-box { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column; min-height: 640px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.ng-hud { display: flex; align-items: center; gap: 10px; padding: 8px 12px 4px; font-weight: 700; }
.ng-score { font-size: 1.4rem; color: var(--accent-dark); min-width: 3.5em; }
.ng-sleeps, .ng-lv { color: var(--ink-soft); font-size: .95rem; }
.ng-combo { background: #ffe79a; color: #8a5a00; border-radius: 999px; padding: 0 10px; font-size: .85rem; }
.ng-ic { margin-left: auto; font-size: 1.3rem; background: none; border: 0; cursor: pointer; padding: 4px; }
.ng-meter { position: relative; height: 16px; margin: 2px 12px 8px; border-radius: 999px; background: #efe3cf; overflow: hidden; }
.ng-meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: #9cc59a; border-radius: 999px; transition: width .1s linear, background .3s; }
.ng-meter i.mid { background: #f0b45a; }
.ng-meter i.hi { background: #e0604c; }
.ng-meter span { position: absolute; inset: 0; text-align: center; font-size: .68rem; line-height: 16px; color: rgba(74, 59, 47, .7); font-weight: 700; }

/* 舞台: ごまの おうちの ベッドまわり（4:3 を 切りぬいて 表示） */
.ng-stage { position: relative; flex: none; width: 100%; aspect-ratio: 760 / 570; overflow: hidden; background: #3a2a20; }
.ng-stage > * { position: absolute; }
.ng-bg { inset: 0; width: 100%; height: 100%; }
.ng-baby { z-index: 2; aspect-ratio: 1 / 1.74; }
.ng-baby img { position: absolute; left: 0; top: 0; width: 100%; opacity: 0; transition: opacity .3s; }
.ng-stage[data-state="cry"] .b-cry, .ng-stage[data-state="sleep"] .b-sleep { opacity: 1; }
.ng-stage[data-state="calm"] .ng-baby { visibility: hidden; }
.ng-rim { z-index: 3; pointer-events: none; }
.ng-goma { z-index: 4; transform: translate(-50%, -100%); pointer-events: none; }
.ng-goma img { width: 100%; max-width: none; display: block; }
.ng-goma .g-hug { display: none; width: 112%; margin-left: -6%; }
.ng-stage[data-state="calm"] .ng-goma .g-stand { display: none; }
.ng-stage[data-state="calm"] .ng-goma .g-hug { display: block; }
.ng-zzz { z-index: 5; color: #3d5590; font-weight: 700; font-size: 1.2rem; text-shadow: 0 1px 0 #fff; opacity: 0; transition: opacity .3s; pointer-events: none; }
.ng-stage[data-state="sleep"] .ng-zzz { opacity: 1; animation: ng-zz 2.4s ease-in-out infinite; }
@keyframes ng-zz { 50% { transform: translateY(-6px); opacity: .6; } }
/* なみだの つぶ（絵は うごかさず、つぶだけ おちる） */
.ng-tear { z-index: 5; width: 7px; height: 10px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: rgba(150, 205, 240, .95); box-shadow: 0 0 2px #fff; opacity: 0; pointer-events: none; }
.ng-stage[data-state="cry"] .ng-tear { animation: ng-tear 1.1s ease-in infinite; }
.ng-stage[data-state="cry"] .ng-tear.t2 { animation-delay: .55s; }
@keyframes ng-tear { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(26px); } }
.ng-stage.is-boss::after { content: ""; position: absolute; inset: 0; background: rgba(20, 30, 70, .35); pointer-events: none; z-index: 6; }

.ng-bubble { left: 8px; top: 8px; transform: translateY(-8px); z-index: 7; display: flex; align-items: center; gap: 8px; max-width: 62%;
  background: #fffdf8; border: 3px solid #4a3b2f; border-radius: 20px; padding: 6px 14px; font-weight: 700; opacity: 0; transition: opacity .2s, transform .2s; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.ng-bubble.on { opacity: 1; transform: none; }
.ng-why-i { font-size: 1.6rem; line-height: 1; }
.ng-bubble.hard { border-style: dashed; }
.ng-bubble.q { background: #f3ecff; border-color: #6a4fa0; }
.ng-say { left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 7; margin: 0; white-space: nowrap; max-width: 94%; overflow: hidden; text-overflow: ellipsis;
  background: rgba(74, 59, 47, .88); color: #fff; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: .95rem; opacity: 0; transition: opacity .25s; }
.ng-say.on { opacity: 1; }
.ng-say.yes { background: rgba(63, 122, 92, .92); }
.ng-say.boss { background: rgba(40, 50, 110, .92); }
.ng-float { left: 50%; top: 40%; z-index: 8; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: 1.5rem; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); white-space: nowrap; animation: ng-up 1.2s ease-out forwards; pointer-events: none; }
.ng-float.no { color: #ffd0c4; font-size: 1.7rem; top: 30%; }
.ng-float.small { font-size: 1rem; top: 52%; }
.ng-float.lv { color: #ffe79a; top: 22%; }
@keyframes ng-up { to { transform: translate(-50%, -60px); opacity: 0; } }

.ng-put { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; z-index: 15; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(30, 24, 20, .45); }
.ng-put[hidden] { display: none; }
.ng-put-t { color: #fff; font-weight: 700; text-align: center; margin: 0 0 8px; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.ng-put-t small { display: block; font-weight: 500; font-size: .8rem; }
.ng-track { position: relative; width: 96px; height: min(62%, 260px); border-radius: 48px; background: rgba(255, 253, 248, .25); border: 3px dashed rgba(255, 253, 248, .8); }
.ng-knob { position: absolute; left: 50%; top: 0; margin-left: -42px; width: 84px; height: 84px; border-radius: 50%; padding: 0; border: 4px solid #fffdf8; background: #fbf1de; cursor: grab; touch-action: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); overflow: hidden; }
.ng-knob img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ng-bed { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 2.4rem; pointer-events: none; }
.ng-put.fast .ng-knob { border-color: #e0604c; box-shadow: 0 0 0 6px rgba(224, 96, 76, .45); }

.ng-tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; background: var(--bg2); }
.ng-tray.n8 { grid-template-columns: repeat(4, 1fr); }
.ng-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 66px; padding: 6px 4px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-size: .78rem; font-weight: 700; line-height: 1.25; cursor: pointer; transition: transform .08s; }
.ng-opt i { font-style: normal; font-size: 1.6rem; line-height: 1.1; }
.ng-opt:active { transform: scale(.95); }
.ng-opt.no { opacity: .35; border-color: #e0a090; }
.ng-opt.yes { border-color: #3f7a5c; background: #e3f2e6; }
.ng-opt:disabled { cursor: default; }

.ng-panel { position: absolute; inset: 0; z-index: 20; overflow-y: auto; padding: 22px 18px; text-align: center; background: rgba(251, 245, 234, .96); }
.ng-start { background: linear-gradient(rgba(251, 245, 234, .82), rgba(251, 245, 234, .96) 45%), url("quick_stage.jpg") center 70% / cover; }
.ng-panel h1 { font-size: 1.45rem; margin-top: 10px; }
.ng-mode { display: inline-block; margin: 4px 0 0; padding: 0 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .8em; }
.ng-panel h1 .en, .ng-panel h2 .en { display: block; font-size: .65em; font-weight: 500; color: var(--ink-soft); }
.ng-btns { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; }
.ng-btns .btn { font-size: 1.1rem; padding: 12px 34px; border: 0; cursor: pointer; font-family: inherit; }
.ng-sub { font: inherit; font-weight: 700; padding: 9px 22px; border-radius: 999px; border: 2px solid var(--accent); background: var(--card); color: var(--accent-dark); cursor: pointer; }
.ng-best { color: var(--accent-dark); font-weight: 700; }
.ng-bgm { font-size: .9rem; color: var(--ink-soft); }
.ng-other a { font-size: .85rem; font-weight: 700; color: #3f7a5c; }
.ng-over-t { font-size: 1.3rem; font-weight: 700; margin-top: 6px; }
.ng-res { font-size: 1.1rem; }
.ng-res b { font-size: 1.6rem; color: var(--accent-dark); }
.ng-res em { color: #c0392b; font-style: normal; font-weight: 700; }
.ng-title { font-weight: 700; }
.ng-card { width: 62%; max-width: 260px; margin: 6px auto 10px; border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.ng-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ng-share a, .ng-share button { font: inherit; font-size: .88rem; font-weight: 700; padding: 8px 14px; border-radius: 999px; text-decoration: none; cursor: pointer; border: 0; }
.ng-x { background: #111; color: #fff; }
.ng-sh { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); color: #fff; }
.ng-dl { background: var(--bg2); color: var(--ink); }
.ng-zk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.ng-zc { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 4px; font-size: .78rem; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ng-zc i { font-style: normal; font-size: 1.6rem; }
.ng-zc small { color: var(--ink-soft); font-size: .68rem; line-height: 1.3; }
.ng-zc a { color: var(--accent-dark); font-size: .7rem; font-weight: 700; }
.ng-zc.lock { opacity: .45; }
.ng-zk-n { font-weight: 700; color: var(--accent-dark); }
@media (min-width: 700px) { .ng-opt { font-size: .85rem; } }
@media (prefers-reduced-motion: reduce) { .ng-tear, .ng-zzz { animation: none !important; } }
