/* オンラインアラームのページ（/xx/alarm-clock）。見た目は NoOversleep（no.css の上に重ねる）。2026-12-06
   クリーム色の地・黒い太枠に黒いずらし影の札・黄色は強調だけ。横幅は速度測定ページと同じ 1040px。 */
body.ac main { max-width: 1040px; padding: 8px 24px 72px; }
body.ac header.site { max-width: 1040px; padding: 16px 24px; }
body.ac header.site .brand { gap: 10px; }

.ac-top {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: center;
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 24px; box-shadow: 5px 5px 0 var(--ink);
  padding: 32px 40px; margin: 8px 0 0;
}
.ac-tool { width: 100%; max-width: 560px; text-align: center; }
.ac-h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 14px; }
html[lang=ja] .ac-h1, html[lang=ja] .ac-app p, html[lang=ja] .ac-note { word-break: auto-phrase; }

/* 状態ごとに出す面を切り替える */
.ac-setup, .ac-wait, .ac-ring { display: none; }
.ac-tool[data-state="setup"] .ac-setup,
.ac-tool[data-state="wait"] .ac-wait,
.ac-tool[data-state="ring"] .ac-ring { display: block; }

.ac-now { margin: 0 0 10px; color: var(--sub); font-size: 14px; }
.ac-now-label { margin-inline-end: 8px; }
.ac-now-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }

.ac-field { display: block; text-align: start; font-size: 13px; font-weight: 700; color: var(--sub); margin: 0 0 12px; }
.ac-field > span { display: block; margin: 0 0 4px; }
.ac-time-field input {
  display: block; width: 100%; font: inherit; font-size: 56px; font-weight: 800; letter-spacing: -.02em; text-align: center;
  color: var(--ink); background: var(--paper); border: 2.5px solid var(--ink); border-radius: 18px; padding: 6px 12px;
  font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; min-height: 1.4em; line-height: 1.2;
}
/* iPhone の Safari は時刻を左に寄せるので真ん中に戻す */
.ac-time-field input::-webkit-date-and-time-value { text-align: center; }
/* パソコンの Chrome の時計の印：小さくして、その分を左にも空けて数字を真ん中に置く */
.ac-time-field input { padding-inline: 56px 16px; }
.ac-time-field input::-webkit-calendar-picker-indicator { width: 28px; height: 28px; padding: 0; margin-inline-start: 12px; cursor: pointer; }
.ac-presets { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 16px; }
.ac-chip {
  font: inherit; font-size: 14px; font-weight: 700; background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ac-chip:hover { background: var(--yellow); }
/* 「今からすぐ」は見出しを上に置き、ボタンは同じ幅のます目に並べる（パソコン 4 列・スマホ 2 列） */
/* よく使う時刻も同じ幅のます目に（パソコン 6 列・スマホ 3 列）。下の「今からすぐ」と左右の端をそろえる */
.ac-presets:not(.ac-in) { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ac-presets .ac-chip { padding-inline: 4px; }
.ac-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: -4px; }
.ac-in-label { grid-column: 1 / -1; text-align: start; font-size: 13px; font-weight: 700; color: var(--sub); }
.ac-chip-in { padding-inline: 6px; white-space: nowrap; }
.ac-chip-in { background: var(--yellow); }
.ac-chip-in:hover { background: var(--card); }
.ac-row { display: flex; gap: 8px; align-items: flex-end; }
.ac-row .ac-field { flex: 1 1 auto; min-width: 0; }
/* 「試す」は音の欄と同じ高さ・同じ角の丸みにそろえる */
.ac-row .ac-btn { flex: none; height: 48px; padding: 0 22px; margin: 0 0 12px; border-radius: 14px; white-space: nowrap; }
/* 音の欄：ブラウザごとの見た目を消して、矢印を自前で描く（右から左の言語では左に） */
.ac-field select {
  display: block; width: 100%; height: 48px; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink);
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%23111' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 2.5px solid var(--ink); border-radius: 14px; padding: 0 44px 0 14px;
}
[dir=rtl] .ac-field select { background-position: left 16px center; padding: 0 14px 0 44px; }
.ac-field select:hover { background-color: var(--paper); }
/* 音量：つまみは黄色に黒い縁・溝は黒い枠（どのブラウザでも同じ見た目にする） */
.ac-vol input {
  display: block; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none; --v: 80%;
}
.ac-vol input::-webkit-slider-runnable-track {
  height: 12px; border: 2px solid var(--ink); border-radius: 999px;
  background: linear-gradient(to right, var(--ink) var(--v), var(--card) var(--v));
}
[dir=rtl] .ac-vol input::-webkit-slider-runnable-track { background: linear-gradient(to left, var(--ink) var(--v), var(--card) var(--v)); }
.ac-vol input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -9px;
  background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%;
}
.ac-vol input::-moz-range-track { height: 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); }
.ac-vol input::-moz-range-progress { height: 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); }
.ac-vol input::-moz-range-thumb { width: 22px; height: 22px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%; }
.ac-vol input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 999px; }

.ac-btn {
  display: inline-block; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  border-radius: 999px; padding: 11px 22px; border: 2.5px solid var(--ink);
}
.ac-btn[hidden] { display: none; }
.ac-btn-main { width: 100%; background: var(--ink); color: var(--yellow); font-size: 19px; padding: 14px 22px; margin: 6px 0 0; }
.ac-btn-ghost { background: var(--card); color: var(--ink); }
.ac-btn-ghost:hover { background: var(--yellow); }
.ac-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

/* 待っている面 */
.ac-wait-at { margin: 0; color: var(--sub); font-weight: 700; }
.ac-count { font-size: 76px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
/* 「画面を暗く・全画面・取り消す」は同じ幅で 1 列に並べる（出ているボタンの数に合わせて割る） */
.ac-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0 0; }
.ac-actions .ac-btn { flex: 1 1 auto; padding: 10px 14px; font-size: 15px; white-space: nowrap; }

/* 鳴っている面 */
.ac-ring-time {
  font-size: 84px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 4px 0 14px;
  font-variant-numeric: tabular-nums; animation: ac-blink 1s steps(2, start) infinite;
}
.ac-ring .ac-btn-ghost { width: 100%; margin: 10px 0 0; }
.ac-tool[data-state="ring"] { background: var(--yellow); border-radius: 18px; padding: 16px; }
@keyframes ac-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .ac-ring-time { animation: none; } }

/* 全画面のとき */
.ac-tool:fullscreen { max-width: none; display: flex; flex-direction: column; justify-content: center; background: var(--paper); padding: 24px; }
.ac-tool:fullscreen .ac-count, .ac-tool:fullscreen .ac-ring-time { font-size: min(22vw, 220px); }

/* 画面を暗く */
.ac-dimmer { position: fixed; inset: 0; z-index: 1000; background: #000; color: #444; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.ac-dimmer[hidden] { display: none; }
.ac-dimmer p { margin: 0; font-size: 56px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ac-dimmer .ac-dim-hint { font-size: 13px; font-weight: 400; margin-top: 8px; }

/* NoOversleep の案内（開いたときから出す・位置は動かさない） */
.ac-app { width: 100%; max-width: 620px; text-align: center; background: var(--paper); border: 2px dashed var(--ink); border-radius: 20px; padding: 18px 20px; }
.ac-app[hidden] { display: none; }
.ac-app-head { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ac-app-head img { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--ink); flex: none; }
.ac-app .ac-app-title { font-size: 20px; font-weight: 800; margin: 0; line-height: 1.35; }
.ac-app p { color: #333; margin: 10px 0 12px; font-size: 14.5px; }
.ac-app .gp-badge { display: inline-block; margin: 0; }
.ac-app .gp-badge img { height: 64px; width: auto; display: block; margin: 0 auto; }

/* 関連アプリ（記事と同じ中身を NoOversleep の札の形で） */
body.ac .apps-related { margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
body.ac .apps-related h2 { grid-column: 1 / -1; font-size: 24px; font-weight: 800; margin: 0 0 12px; padding: 0; border: 0; }
body.ac .apps-related .cta-top { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px; background: var(--card); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); color: var(--ink); text-decoration: none; }
body.ac .apps-related img.ct-icon { width: 40px; height: 40px; border-radius: 10px; flex: none; }
body.ac .apps-related .ct-text { flex: 1 1 0; min-width: 0; line-height: 1.35; }
body.ac .apps-related .ct-text strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 14px; font-weight: 700; }
body.ac .apps-related .ct-text span { display: block; font-size: 12.5px; color: var(--muted); }
body.ac .apps-related img.ct-badge { height: 36px; width: auto; flex: none; }

/* 説明文 */
body.ac .ac-doc { margin: 48px 0 0; max-width: 760px; }
body.ac .ac-doc h2 { font-weight: 800; font-size: 30px; letter-spacing: -.01em; margin: 40px 0 12px; }
body.ac .ac-doc p, body.ac .ac-doc li { color: #333; }
body.ac .ac-doc table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border: 2px solid var(--ink); }
body.ac .ac-doc th, body.ac .ac-doc td { border-bottom: 1px solid rgba(17,17,17,.2); padding: 9px 12px; text-align: start; }
body.ac .ac-doc th { background: var(--yellow); font-weight: 800; }

@media (max-width: 860px) {
  .ac-top { padding: 24px 16px; border-radius: 18px; }
  body.ac .apps-related { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body.ac main { padding: 8px 16px 56px; }
  /* よく使う時刻は 3 列のます目に（折り返しで行の長さがばらつかないように） */
  .ac-presets:not(.ac-in) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ac-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-h1 { font-size: 21px; }
  .ac-time-field input { font-size: 44px; }
  .ac-count { font-size: 56px; }
  .ac-ring-time { font-size: 64px; }
  .ac-app .gp-badge img { height: 56px; }
  .ac-app-head { justify-content: flex-start; text-align: start; }
  .ac-app .ac-app-title { font-size: 17px; }
  .ac-app p { text-align: start; }
  body.ac .apps-related img.ct-badge { height: 30px; }
  body.ac .ac-doc h2 { font-size: 23px; }
}
/* 幅 360px 以下の小さいスマホ：ボタンの字と余白を詰めて 1 行に収める */
@media (max-width: 360px) {
  .ac-top { padding: 20px 12px; }
  .ac-chip { font-size: 13px; padding: 4px 4px; }
  .ac-row .ac-btn { padding: 0 14px; }
}
