@charset "utf-8";

/* reset */
*{ margin:0; padding:0; box-sizing:border-box; }

:root{
  --cream:#F6F6F2;
  --ink:#111;

  /* type */
  --ui:"Noto Sans JP",sans-serif;
  --display:"Cormorant Garamond",serif;

  /* desktop sizes */
  --title:40px;
  --big:72px;
  --label:16px;
  --small:16px;

  /* spacing */
  --topbar:60px;
  --bottombar:40px;
  --padx:10vw;
}

html{
  background:#000;
  color:var(--cream);
  font-family:var(--ui);
  font-size:16px;
}

body{
  width:100vw;
  height:100vh;
  overflow:hidden;
  position:relative;
}

/* background */
#bg,#veil,#film{
  position:absolute;
  top:0; left:0;
  width:100%;
  height:100%;
}

#bg{
  background: url("../images/bg.jpg") center 65% / cover no-repeat;
  /*              横向中心  纵向往下65% */
}

#veil{
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,.06), transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.65));
}

#film{
  background:url("../images/grain.png") repeat;
  opacity:.10;
  pointer-events:none;
}

/* bars */
#bar_top,#bar_bottom{
  position:absolute;
  left:0;
  width:100%;
  background:var(--cream);
  z-index:5;
}
#bar_top{ top:0; height:var(--topbar); }
#bar_bottom{ bottom:0; height:var(--bottombar); }

/* logo & link */
#logo{
  position:absolute;
  top:14px;              /* 往上挪：改这里 */
  left:24px;
  z-index:10;
}
#logo img{ height:28px; display:block; }

#link{
  position:absolute;
  right:24px;
  bottom:11px;
  color:var(--ink);
  font-size:12px;
  opacity:.85;
  z-index:10;
}

/* wrap */
#wrap{
  position:relative;
  height:100%;
  padding-top:calc(var(--topbar) + 38px);
  padding-bottom:calc(var(--bottombar) + 28px);
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
  text-shadow:0 2px 10px rgba(0,0,0,.55);
}

/* title */
#title{
  width:100%;
  text-align:center;
}
#title h2{
  font-family:var(--display);
  font-size:var(--title);
  font-weight:500;
  letter-spacing:.08em;
}
#title p{
  margin-top:6px;
  font-size:12px;
  opacity:.7;
}

/* routes: desktop two columns */
#routes{
  width:100%;
  max-width:1180px;
  padding:0 var(--padx);
  display:grid;
  grid-template-columns: 1fr 2px 1fr;
  column-gap:56px;
  align-items:center;
}

.route{
  text-align:center;
  min-width:0;
}

.label{
  font-size:var(--label);
  margin-bottom:12px;
}

.time_big{
  font-family:var(--display);
  font-size:var(--big);
  font-weight:500;
  letter-spacing:.08em;
  line-height:1.0;
}

.small_line{
  font-size:var(--small);
  margin-top:10px;
  line-height:1.4;
}

.small_line.next{ margin-top:18px; }

/* divider: vertical (desktop) */
#divider{
  width:2px;
  height:260px;
  justify-self:center;
  background:linear-gradient(
    to bottom,
    rgba(246,246,242,0),
    rgba(246,246,242,.6),
    rgba(246,246,242,0)
  );
  opacity:.9;
}

/* progress */
.progress{
  width:60%;
  height:8px;
  margin:24px auto 0;
  background:rgba(246,246,242,.25);
  border-radius:4px;
}
.progress_bar{
  height:8px;
  width:0%;
  background:rgba(246,246,242,.90);
  border-radius:4px;
  transition:width .6s ease;
}

/* now */
#now{
  width:100%;
  text-align:center;
}
#date,#clock{ font-size:18px; }
#hint{ font-size:10px; opacity:.7; margin-top:8px; }

/* vinyl: “像播放器”的外观（只改形态，让人知道可点） */
#vinyl{
  position:absolute;
  right:24px;
  bottom:calc(var(--bottombar) + 40px);
  width:52px;
  height:52px;
  border-radius:50%;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(246,246,242,.45);
  cursor:pointer;
  z-index:10;
}

/* 中间“播放三角” */
#vinyl::after{
  content:"";
  position:absolute;
  top:50%;
  left:52%;
  width:0; height:0;
  transform:translate(-50%,-50%);
  border-left:10px solid rgba(246,246,242,.85);
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
}

/* 外圈刻度（播放器感） */
#vinyl::before{
  content:"";
  position:absolute;
  inset:7px;
  border-radius:50%;
  border:1px dashed rgba(246,246,242,.35);
}

/* 播放中旋转 + 图标变成暂停 */
#vinyl.playing{ animation:spin 2.2s linear infinite; }
#vinyl.playing::after{
  content:"";
  width:14px;
  height:14px;
  border-left:4px solid rgba(246,246,242,.85);
  border-right:4px solid rgba(246,246,242,.85);
  border-top:0;
  border-bottom:0;
  transform:translate(-50%,-50%);
}

@keyframes spin{ to{ transform:rotate(360deg); } }

/* =========================
   Portrait (Phone / iPad)
   上下排列，避免重叠
========================= */
@media (orientation: portrait), (max-width: 820px){

  :root{
    --padx: 8vw;
    --title: 34px;
    --big: 64px;
    --label: 16px;
    --small: 15px;
  }

  #wrap{
    padding-top:calc(var(--topbar) + 28px);
    padding-bottom:calc(var(--bottombar) + 22px);
  }

  #routes{
    grid-template-columns: 1fr;
    row-gap:22px;
  }

  /* divider 变横线（看起来像你竖版截图那条） */
  #divider{
    width:70%;
    height:2px;
    margin:6px auto;
    background:linear-gradient(
      to right,
      rgba(246,246,242,0),
      rgba(246,246,242,.55),
      rgba(246,246,242,0)
    );
  }

  .progress{ width:72%; }

  /* 让“次のバス”在小屏也不挤 */
  .small_line{
    margin-top:8px;
    word-break:keep-all;
    white-space:normal;
  }

  #vinyl{
    right:18px;
    bottom:calc(var(--bottombar) + 22px);
  }
}