:root{--cream:#f1e7d5;--text:#f4f0e8;--muted:#d2d0ca;--line:rgba(255,255,255,.22);--bg:#7894b2;--ease:cubic-bezier(.22,1,.36,1)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg)}body{font-family:Inter,Arial,sans-serif;color:var(--text);cursor:none}.mono{font-family:"DM Mono",monospace}
.loader{position:fixed;inset:0;z-index:50;background:var(--bg);display:grid;place-items:center;transition:opacity .8s var(--ease),visibility .8s}.loader.done{opacity:0;visibility:hidden}.loader-inner{width:min(280px,62vw)}.loader-brand{font-size:14px;letter-spacing:.18em;margin-bottom:28px}.loader-meta{display:flex;justify-content:space-between;font:10px "DM Mono",monospace;letter-spacing:.12em;opacity:.78;margin-bottom:8px}.progress{height:1px;background:rgba(255,255,255,.25);overflow:hidden}.progress span{display:block;height:100%;width:0;background:var(--cream);transition:width .18s ease}
.experience{position:relative;width:100%;height:100%;isolation:isolate;overflow:hidden}.experience canvas{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:0}.shade{position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,rgba(37,48,62,.22) 0%,rgba(37,48,62,.04) 46%,transparent 70%)}
.header{position:absolute;z-index:5;top:0;left:5.4%;right:5.4%;height:92px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;font-size:12px}.brand-group{display:flex;align-items:center;gap:24px}.brand{font-size:15px;letter-spacing:.08em;font-weight:700}.header-index{font-size:9px;letter-spacing:.13em;opacity:.72}.header-title{font-size:12px;letter-spacing:.08em}.status{justify-self:end;display:flex;gap:8px;align-items:center;font-size:10px;letter-spacing:.08em;opacity:.85}.status i{width:5px;height:5px;border-radius:50%;background:var(--cream);box-shadow:0 0 0 4px rgba(241,231,213,.1)}
.hero-copy{position:absolute;z-index:4;left:5.4%;top:50%;transform:translateY(-51%);width:min(790px,58vw);pointer-events:none}.eyebrow{font:11px "DM Mono",monospace;letter-spacing:.1em;color:var(--cream);margin-bottom:22px;opacity:0;transform:translateY(18px)}h1{margin:0;font-size:clamp(58px,6.6vw,104px);line-height:.91;letter-spacing:-.065em;font-weight:800;max-width:760px}h1 span,h1 em{display:block}h1 span{color:#f6f1e8;opacity:0;transform:translateY(24px)}h1 em{font-style:normal;color:transparent;-webkit-text-stroke:1.2px rgba(247,243,235,.92);opacity:0;transform:translateY(24px)}.action-row{display:flex;align-items:center;gap:38px;margin-top:34px;pointer-events:auto}.action-row p{margin:0;max-width:410px;font-size:14px;line-height:1.85;color:#ddd9d0;letter-spacing:.015em;opacity:0;transform:translateY(18px)}.face-btn{flex:0 0 122px;width:122px;height:122px;border:1px solid rgba(248,244,236,.55);border-radius:50%;background:rgba(245,239,228,.96);color:#52657a;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;font:500 13px/1.25 Inter,Arial,sans-serif;cursor:none;transition:background .45s var(--ease),transform .45s var(--ease),border-color .45s}.face-btn b{font:14px "DM Mono",monospace;transition:transform .45s var(--ease)}.face-btn:hover{background:var(--cream);border-color:var(--cream);transform:translateY(-2px)}.face-btn:hover b{transform:translateX(4px)}.stats{display:flex;gap:48px;margin-top:42px;opacity:0;transform:translateY(18px);pointer-events:none}.stats div{display:flex;align-items:baseline;gap:9px}.stats strong{font-size:10px;letter-spacing:.11em;font-weight:500}.stats span{font-size:9px;letter-spacing:.06em;opacity:.58}.footer{position:absolute;z-index:5;bottom:0;left:5.4%;right:5.4%;height:58px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;font-size:9px;letter-spacing:.08em;opacity:0;transform:translateY(14px);color:rgba(244,240,232,.7)}
.ready .eyebrow{animation:rise .8s .08s var(--ease) forwards}.ready h1 span{animation:rise .9s .18s var(--ease) forwards}.ready h1 em{animation:rise .9s .28s var(--ease) forwards}.ready .action-row p{animation:rise .8s .42s var(--ease) forwards}.ready .stats{animation:rise .8s .56s var(--ease) forwards}.ready .footer{animation:rise .8s .7s var(--ease) forwards}@keyframes rise{to{opacity:1;transform:translateY(0)}}
.custom-cursor{position:fixed;z-index:100;left:0;top:0;width:34px;height:34px;margin:-17px 0 0 -17px;border:1px solid rgba(241,231,213,.62);border-radius:50%;pointer-events:none;mix-blend-mode:normal;transition:width .25s var(--ease),height .25s var(--ease),margin .25s var(--ease),border-color .25s}.custom-cursor span{position:absolute;width:4px;height:4px;left:50%;top:50%;margin:-2px;border-radius:50%;background:var(--cream)}.custom-cursor.hover{width:48px;height:48px;margin:-24px 0 0 -24px;border-color:var(--cream)}
@media (max-width:900px){.header{height:78px;left:5%;right:5%}.header-title{font-size:11px}.header-index{display:none}.hero-copy{left:5%;width:72vw}.action-row{gap:24px}.face-btn{width:105px;height:105px;flex-basis:105px}.stats{gap:28px;margin-top:30px}}
@media (max-width:640px){body{cursor:auto}.custom-cursor{display:none}.shade{background:linear-gradient(180deg,rgba(38,49,63,.18),rgba(38,49,63,.02) 55%,rgba(38,49,63,.18))}.header{left:6%;right:6%;height:70px}.brand{font-size:13px}.header-title{justify-self:end;font-size:10px}.status{display:none}.hero-copy{left:6%;top:49%;width:88vw;transform:translateY(-50%)}.eyebrow{font-size:9px;margin-bottom:16px}h1{font-size:clamp(46px,13vw,68px);line-height:.93}.action-row{margin-top:24px;display:flex;flex-direction:column;align-items:flex-start;gap:20px}.action-row p{font-size:12px;line-height:1.8;max-width:310px}.face-btn{width:96px;height:96px;flex-basis:96px}.stats{margin-top:26px;gap:20px}.stats div{display:block}.stats strong,.stats span{display:block}.stats span{margin-top:5px}.footer{left:6%;right:6%;height:50px;font-size:8px}.footer span:last-child{display:none}}
/* Camera tracking toggle */
.camera-toggle{margin-left:10px;padding:7px 10px;border:1px solid rgba(241,231,213,.38);border-radius:999px;background:rgba(20,28,38,.16);color:var(--text);font:9px "DM Mono",monospace;letter-spacing:.02em;white-space:nowrap;cursor:pointer;transition:background .25s ease,border-color .25s ease}
.camera-toggle:hover,.camera-toggle.is-active{background:rgba(241,231,213,.16);border-color:var(--cream)}
.camera-toggle:disabled{opacity:.55;cursor:wait}
#cameraVideo{position:fixed;width:1px;height:1px;opacity:0;pointer-events:none;left:-10px;bottom:-10px}
@media(max-width:900px){.status{gap:5px}.camera-toggle{padding:6px 7px;font-size:8px}}
@media(max-width:640px){.status{display:flex;position:absolute;right:0;top:76px;font-size:9px}.camera-toggle{font-size:8px}.header{grid-template-columns:1fr auto}.header-title{margin-right:0}}
/* ========================================
   GAZE: Mobile / PWA support
   ======================================== */
html {
  width: 100%;
  min-height: 100%;
  margin: 0;
}
body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
/* ノッチ・ホームインジケーターの余白 */
body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}
/* Canvasの基本設定 */
canvas {
  max-width: 100%;
  touch-action: pan-y;
}
/* スマホ縦画面 */
@media (max-width: 767px) {
  body {
    font-size: 14px;
  }
  canvas {
    display: block;
  }
}
/* 横画面 */
@media (max-width: 767px) and (orientation: landscape) {
  body {
    min-height: 100dvh;
  }
}
/* 動きを減らす設定をOS側で有効にしている場合 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* GAZE: smartphone-only layout
   PC layout remains unchanged. */
@media screen and (max-width: 640px) {
  #experience {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }
  /* 猫の描画領域は全画面のまま維持 */
  #gazeCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  /* 左側のテキスト・操作メニュー */
  .hero-copy {
    left: 5%;
    top: 52%;
    width: 43%;
    max-width: 43%;
    transform: translateY(-50%);
    z-index: 4;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 12px;
  }
  .hero-copy h1 {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.05em;
  }
  .action-row {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .action-row p {
    max-width: 100%;
    font-size: 11px;
    line-height: 1.7;
  }
  .face-btn {
    width: 72px;
    height: 72px;
    min-height: 44px;
    flex-basis: 72px;
    font-size: 11px;
    cursor: pointer;
  }
  .stats {
    display: none;
  }
  .footer {
    left: 5%;
    right: 5%;
  }
}
@media screen and (max-width: 380px) {
  .hero-copy {
    left: 4%;
    width: 42%;
    max-width: 42%;
  }
  .hero-copy h1 {
    font-size: 28px;
  }
  .action-row p {
    font-size: 10px;
  }
  .face-btn {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }
}
/* Mobile layout: copy and controls above, cat image below. PC remains unchanged. */
@media screen and (max-width: 640px) {
  .hero-copy {
    left: 6%;
    top: 31%;
    width: 88%;
    max-width: 88%;
    transform: translateY(-50%);
    z-index: 4;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 10px;
  }
  .hero-copy h1 {
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1.05;
  }
  .action-row {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .action-row p {
    max-width: 100%;
    font-size: 11px;
    line-height: 1.6;
  }
  .face-btn {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }
  .stats {
    display: none;
  }
}
@media screen and (max-width: 380px) {
  .hero-copy {
    top: 30%;
  }
  .hero-copy h1 {
    font-size: 28px;
  }
  .action-row p {
    font-size: 10px;
  }
}
/* Mobile polish: keep header/footer visible without affecting desktop */
@media screen and (max-width: 640px) {
  .header {
    position: absolute;
    top: env(safe-area-inset-top, 0px);
    left: 6%;
    right: 6%;
    z-index: 10;
  }
  .footer {
    position: absolute;
    bottom: env(safe-area-inset-bottom, 0px);
    left: 6%;
    right: 6%;
    z-index: 10;
  }
  #experience {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }
  #gazeCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
}
/* GAZE mobile visual polish */
@media screen and (max-width: 640px) {
  body {
    background: #7896b3;
  }
  #experience {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(
      180deg,
      #7896b3 0%,
      #718eac 48%,
      #7896b3 100%
    );
  }
  #gazeCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }
  .header {
    z-index: 5;
    border-bottom-color: rgba(255, 255, 255, 0.28);
  }
  .hero-copy {
    z-index: 4;
  }
  .footer {
    z-index: 5;
    border-top-color: rgba(255, 255, 255, 0.28);
  }
  .face-btn {
    box-shadow: 0 8px 24px rgba(30, 49, 69, 0.10);
  }
}


/* Final mobile viewport/canvas normalization. Desktop rules remain unchanged. */
@media screen and (max-width: 640px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
  }

  #experience {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #gazeCanvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
  }
}

/* =========================================
   DASHBOARD LAYOUT
   Desktop: default styles
   Smartphone: max-width 640px
   ========================================= */

/* Desktop / PC */
.dashboard-controls {
  position: absolute;
  z-index: 8;
  top: 108px;
  left: 5.4%;
  right: 5.4%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-controls .dashboard-tagline {
  position: static;
  margin: 0;
  color: rgba(255,255,255,.95);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .04em;
}

.dashboard-controls .dashboard-menu {
  position: static;
  inset: auto;
  width: auto;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-controls .dashboard-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 150px;
  min-height: 58px;
  padding: 12px 20px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 16px;
  background: rgba(36,52,70,.18);
  color: #f4f0e8;
  font: 500 14px Inter, Arial, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .2s ease, transform .2s ease;
}

.dashboard-controls .dashboard-button:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-2px);
}

.dashboard-controls .dashboard-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255,255,255,.14);
  font-size: 21px;
}

.dashboard-controls .dashboard-label {
  white-space: nowrap;
}

/* Smartphone only */
@media screen and (max-width: 640px) {
  .dashboard-controls {
    top: 125px;
    left: 6%;
    right: 6%;
    gap: 12px;
    align-items: stretch;
  }

  .dashboard-controls .dashboard-tagline {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: .02em;
  }

  .dashboard-controls .dashboard-menu {
    width: 100%;
    gap: 8px;
    justify-content: space-between;
  }

  .dashboard-controls .dashboard-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 64px;
    padding: 8px 3px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border-radius: 14px;
    font-size: 11px;
  }

  .dashboard-controls .dashboard-icon {
    width: 25px;
    height: 25px;
    font-size: 18px;
  }

  .dashboard-controls .dashboard-label {
    white-space: normal;
    text-align: center;
  }
}

/* Top copy removed: preserve its original layout space */
.hero-copy .eyebrow,
.hero-copy h1 {
  visibility: hidden !important;
}

/* Consolidated mobile viewport and control layout */
@media screen and (max-width: 640px) {
  html,
  body {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
  }

  main,
  .experience {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
  }

  .experience,
  #experience {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100svh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .experience canvas,
  #gazeCanvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .header {
    position: absolute !important;
    top: env(safe-area-inset-top, 0px) !important;
  }

  .footer {
    position: absolute !important;
    bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  html body #bottom-cursor-description {
    position: absolute !important;
    inset: auto 6% calc(env(safe-area-inset-bottom, 0px) + 66px) 6% !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 10000 !important;
  }

  #faceBtn {
    position: absolute !important;
    left: 6% !important;
    right: auto !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 135px) !important;
    top: auto !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 10002 !important;
  }
}

/* Home Screen only: viewport and dashboard layout */
html.pwa-standalone #experience {
  height: 100svh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  bottom: auto !important;
  overflow: hidden !important;
}

html.pwa-standalone #gazeCanvas {
  height: 100% !important;
}

html.pwa-standalone .dashboard-controls {
  transform: translateY(35px) !important;
}

/* GAZE Weather Panel */
.gaze-weather-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  padding: 18px;
  background: rgba(10, 17, 27, .36);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.gaze-weather-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gaze-weather-panel {
  width: min(420px, 100%);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px;
  color: #f4f0e8;
  background: rgba(25, 38, 53, .94);
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 24px;
  box-shadow: 0 20px 80px rgba(0,0,0,.3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: translateX(18px);
  transition: transform .22s ease;
}

.gaze-weather-overlay.is-open .gaze-weather-panel {
  transform: translateX(0);
}

.gaze-weather-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gaze-weather-eyebrow {
  font: 10px "DM Mono", monospace;
  letter-spacing: .13em;
  opacity: .65;
}

.gaze-weather-header h2 {
  margin: 8px 0 4px;
  font-size: 25px;
}

#gazeWeatherLocation {
  margin: 0;
  font-size: 12px;
  opacity: .7;
}

.gaze-weather-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: transparent;
  color: white;
  font-size: 25px;
  cursor: pointer;
}

.gaze-weather-message {
  margin: 22px 0;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.gaze-weather-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

#gazeWeatherDescription {
  font-size: 15px;
}

.gaze-weather-temperature {
  margin: 4px 0;
  font-size: 64px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.06em;
}

#gazeWeatherFeels {
  font-size: 12px;
  opacity: .7;
}

.gaze-weather-icon {
  font-size: 54px;
}

.gaze-weather-minmax {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
  padding: 15px 0;
  border-top: 1px solid rgba(255,255,255,.13);
  border-bottom: 1px solid rgba(255,255,255,.13);
  font-size: 12px;
}

.gaze-weather-minmax strong {
  font-weight: 600;
}

.gaze-weather-panel h3 {
  margin: 22px 0 12px;
  font-size: 14px;
}

.gaze-weather-hourly {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gaze-weather-hour {
  padding: 12px 4px;
  text-align: center;
  background: rgba(255,255,255,.07);
  border-radius: 13px;
}

.gaze-weather-hour time,
.gaze-weather-hour span {
  display: block;
  font-size: 11px;
}

.gaze-weather-hour strong {
  display: block;
  margin: 8px 0;
  font-size: 18px;
}

.gaze-weather-cat {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.06);
}

.gaze-weather-cat-label {
  font-size: 12px;
  opacity: .75;
}

#gazeWeatherSpeech {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.8;
}

.gaze-weather-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  font-size: 10px;
  opacity: .75;
}

#gazeWeatherRefresh {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: transparent;
  color: white;
  font: inherit;
  cursor: pointer;
}

#gazeWeatherRefresh:disabled {
  opacity: .5;
  cursor: wait;
}

@media (max-width: 640px) {
  .gaze-weather-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 8px;
  }

  .gaze-weather-panel {
    width: 100%;
    height: min(82dvh, 720px);
    padding: 22px;
    border-radius: 22px;
    transform: translateY(18px);
  }

  .gaze-weather-overlay.is-open .gaze-weather-panel {
    transform: translateY(0);
  }

  .gaze-weather-temperature {
    font-size: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gaze-weather-overlay,
  .gaze-weather-panel {
    transition: none;
  }
}

/* GAZE Weather: popup from the left on PC only */
@media screen and (min-width: 641px) {
  .gaze-weather-overlay {
    justify-content: flex-start;
  }

  .gaze-weather-panel {
    transform: translateX(-18px);
  }

  .gaze-weather-overlay.is-open .gaze-weather-panel {
    transform: translateX(0);
  }
}

/* GAZE: PCでは操作ボタンを縦並びにする */
@media screen and (min-width: 641px) {
  .dashboard-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .dashboard-controls .dashboard-button {
    width: 100%;
    box-sizing: border-box;
  }
}

/* PC：天気・スケジュール・AIアシスタントを縦並びに固定 */
@media screen and (min-width: 641px) {
  .dashboard-controls .dashboard-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: fit-content !important;
    gap: 12px !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-button {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* GAZE Weather: ポップアップ内では通常のマウスカーソルを表示 */
#gazeWeatherOverlay,
#gazeWeatherOverlay * {
  cursor: auto !important;
}

#gazeWeatherOverlay button,
#gazeWeatherOverlay [role="button"] {
  cursor: pointer !important;
}


/* GAZE Voice Panel */
.gaze-voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(10, 17, 27, .42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  cursor: auto !important;
}

.gaze-voice-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gaze-voice-panel {
  width: min(440px, 100%);
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px;
  color: #f5f7fb;
  background: rgba(23, 31, 45, .97);
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  transform: translateX(-18px);
  transition: transform .22s ease;
  cursor: auto !important;
}

.gaze-voice-overlay.is-open .gaze-voice-panel {
  transform: translateX(0);
}

.gaze-voice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.gaze-voice-header h2 {
  margin: 8px 0;
  font-size: 1.5rem;
}

.gaze-voice-header p {
  margin: 0;
  opacity: .75;
}

.gaze-voice-eyebrow {
  font-size: .72rem;
  letter-spacing: .15em;
  opacity: .65;
}

.gaze-voice-panel button,
.gaze-voice-panel textarea {
  font: inherit;
}

.gaze-voice-panel button {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  color: inherit;
  background: rgba(255,255,255,.08);
  cursor: pointer !important;
}

.gaze-voice-panel button:hover {
  background: rgba(255,255,255,.16);
}

.gaze-voice-panel textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  color: #fff;
  background: rgba(0,0,0,.18);
  resize: vertical;
}

.gaze-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#gazeVoiceStatus {
  margin: 20px 0 12px;
  color: #b9d9ff;
}

.gaze-voice-output {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.07);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.gaze-voice-overlay,
.gaze-voice-overlay * {
  cursor: auto !important;
}

.gaze-voice-overlay button {
  cursor: pointer !important;
}

@media screen and (max-width: 640px) {
  .gaze-voice-overlay {
    align-items: flex-end;
    padding: 8px;
  }

  .gaze-voice-panel {
    width: 100%;
    height: min(82dvh, 720px);
    border-radius: 22px;
    transform: translateY(18px);
  }

  .gaze-voice-overlay.is-open .gaze-voice-panel {
    transform: translateY(0);
  }
}

/* GAZE: スマホで画面全体が引っ張られる動作を防止 */
html {
  height: 100%;
  overscroll-behavior-y: none;
}

body {
  overscroll-behavior-y: none;
}

/* タッチ操作によるブラウザの引っ張り更新を抑制 */
@media (max-width: 768px) {
  html,
  body {
    overscroll-behavior: none;
  }
}

/* GAZE mobile: bottom circular dashboard buttons */
@media screen and (max-width: 640px) {
  .dashboard-controls .dashboard-menu {
    position: fixed;
    left: 7%;
    right: 7%;
    bottom: calc(145px + env(safe-area-inset-bottom));
    top: auto;
    width: auto;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 12px;
    z-index: 100;
  }

  .dashboard-controls .dashboard-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    white-space: normal;
  }

  .dashboard-controls .dashboard-button:hover {
    background: transparent;
    transform: none;
  }

  .dashboard-controls .dashboard-icon {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #5687bd;
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 3px 12px rgba(25, 55, 85, 0.12);
  }

  .dashboard-controls .dashboard-label {
    display: block;
    max-width: 100%;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 1px 5px rgba(30, 60, 90, 0.25);
  }

  .dashboard-controls .dashboard-tagline {
    font-size: 16px;
  }

  #bottom-cursor-description {
    bottom: calc(45px + env(safe-area-inset-bottom));
    left: 6%;
    right: 6%;
    font-size: 12px;
    line-height: 1.8;
    text-align: center;
  }
}

/* GAZE mobile: fix dashboard button visibility */
@media screen and (max-width: 640px) {
  .dashboard-controls {
    position: static !important;
    display: block !important;
    transform: none !important;
  }

  .dashboard-controls .dashboard-menu {
    position: fixed !important;
    left: 5% !important;
    right: 5% !important;
    bottom: calc(125px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    width: auto !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: flex-end !important;
    gap: 8px !important;
    z-index: 9999 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-button {
    display: flex !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    color: #fff !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-icon {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #5687bd !important;
    font-size: 28px !important;
    display: grid !important;
    place-items: center !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-label {
    display: block !important;
    color: #fff !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
}

/* GAZE: Fix dashboard buttons in iOS Home Screen app */
html.pwa-standalone .dashboard-controls {
  transform: none !important;
}

@media screen and (max-width: 640px) {
  html.pwa-standalone .dashboard-controls .dashboard-menu {
    position: fixed !important;
    left: 5% !important;
    right: 5% !important;
    top: auto !important;
    bottom: calc(125px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: flex-end !important;
    gap: 8px !important;
    z-index: 99999 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  html.pwa-standalone .dashboard-controls .dashboard-menu .dashboard-button {
    display: flex !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    color: #fff !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  html.pwa-standalone .dashboard-controls .dashboard-menu .dashboard-icon {
    display: grid !important;
    place-items: center !important;
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #5687bd !important;
    font-size: 28px !important;
  }

  html.pwa-standalone .dashboard-controls .dashboard-menu .dashboard-label {
    display: block !important;
    color: #fff !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
}

/* GAZE: Four circular dashboard buttons */
@media screen and (max-width: 640px) {
  .dashboard-controls .dashboard-menu .dashboard-button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    gap: 6px !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-icon {
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px !important;
    font-size: 25px !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-label {
    font-size: 10px !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }
}

/* GAZE: Keep all four buttons on one row */
@media screen and (max-width: 640px) {
  html.pwa-standalone .dashboard-controls .dashboard-menu {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    align-items: start !important;
    gap: 4px !important;
  }

  html.pwa-standalone .dashboard-controls .dashboard-menu #faceBtn {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    color: #fff !important;
  }

  html.pwa-standalone .dashboard-controls .dashboard-menu #faceBtn .dashboard-icon {
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #5687bd !important;
    font-size: 25px !important;
  }

  html.pwa-standalone .dashboard-controls .dashboard-menu #faceBtn .dashboard-label {
    display: block !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
    color: #fff !important;
  }

  html.pwa-standalone .dashboard-controls .dashboard-menu #faceBtn > b {
    display: none !important;
  }
}

/* GAZE: Four-button menu shared by Safari and Home Screen */
@media screen and (max-width: 640px) {
  .dashboard-controls .dashboard-menu {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: start !important;
    justify-content: stretch !important;
    gap: 4px !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-button,
  .dashboard-controls .dashboard-menu #faceBtn {
    position: static !important;
    inset: auto !important;
    float: none !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    color: #fff !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-icon {
    display: grid !important;
    place-items: center !important;
    width: 48px !important;
    height: 48px !important;
    flex: 0 0 48px !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #5687bd !important;
    font-size: 24px !important;
  }

  .dashboard-controls .dashboard-menu .dashboard-label {
    display: block !important;
    width: 100% !important;
    color: #fff !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .dashboard-controls .dashboard-menu #faceBtn > b {
    display: none !important;
  }
}

/* GAZE: Centered header layout for PC and mobile */
#experience > .header {
  position: absolute !important;
  top: max(16px, env(safe-area-inset-top, 0px)) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 12px 16px 0 !important;
  border-bottom: 0 !important;

  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 7px !important;

  text-align: center !important;
}

#experience > .header .brand-group {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  gap: 0 !important;
}

#experience > .header .brand {
  display: block !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  letter-spacing: .16em !important;
  font-weight: 700 !important;
}

#experience > .header .header-index {
  display: none !important;
}

#experience > .header .header-title {
  display: block !important;
  position: static !important;
  margin: 0 !important;
  width: 100% !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  letter-spacing: .08em !important;
  text-align: center !important;
}

#experience > .header .status {
  display: none !important;
}

@media screen and (max-width: 640px) {
  #experience > .header {
    top: max(12px, env(safe-area-inset-top, 0px)) !important;
    padding: 8px 12px 0 !important;
    gap: 5px !important;
  }

  #experience > .header .brand {
    font-size: 20px !important;
  }

  #experience > .header .header-title {
    font-size: 11px !important;
  }
}


/* GAZE: Restore camera tracking button */
#experience > .header .status {
  display: flex !important;
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
  right: 16px !important;
  left: auto !important;
  z-index: 20 !important;
  opacity: 1 !important;
}

#experience > .header .status i,
#experience > .header .status #statusText {
  display: none !important;
}

#experience > .header .status #cameraToggle {
  display: inline-flex !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  font-size: 10px !important;
}
