:root {
  color-scheme:dark;
  --cyan:#00c8ee;
  --pink:#ff006d;
  --yellow:#ffe100;
  --panel:#050607;
  --line:#5d5d5d;
  --content:1024px;
}

* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; background:#000; }
body {
  overflow-x:hidden;
  color:#fff;
  font-family:"Noto Sans JP","Yu Gothic",Meiryo,Arial,sans-serif;
}
body.dialog-open { overflow:hidden; }
button,input,select,textarea { font:inherit; }
button,a,select,input,textarea { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }

.schedule-app {
  width:min(100%,var(--content));
  margin:0 auto;
  padding:24px 22px 38px;
}
.page-header {
  display:grid;
  grid-template-columns:72px 1fr 72px;
  align-items:center;
  min-height:86px;
  padding-bottom:12px;
  border-bottom:3px solid var(--pink);
}
.page-header h1 {
  margin:0;
  text-align:center;
  font-size:clamp(27px,4.1vw,42px);
  font-weight:1000;
  line-height:1.08;
  letter-spacing:.02em;
}
.header-button {
  display:grid;
  place-items:center;
  width:62px;
  height:62px;
  padding:0;
  border:2px solid var(--pink);
  border-radius:16px;
  background:#030303;
  color:#fff;
  text-decoration:none;
  font-family:Arial,sans-serif;
  font-size:48px;
  font-weight:300;
  line-height:1;
  box-shadow:0 0 16px rgba(255,0,109,.3);
}
.page-header .header-button:last-child { justify-self:end; }
.header-button:active { transform:scale(.96); }
.header-button:focus-visible,.home-schedule-card:focus-visible,
.primary-button:focus-visible,.dialog-close:focus-visible,
.form-field input:focus-visible,.form-field select:focus-visible,.form-field textarea:focus-visible,
.form-actions button:focus-visible {
  outline:3px solid #fff;
  outline-offset:3px;
}

.schedule-view > h2 {
  margin:27px 0 14px;
  color:var(--cyan);
  text-align:center;
  font:1000 clamp(25px,4vw,38px)/1 Arial,sans-serif;
  letter-spacing:.13em;
}
.schedule-controls { display:grid; gap:8px; }
.schedule-controls > label {
  position:relative;
  padding-left:18px;
  font-size:20px;
  font-weight:900;
}
.schedule-controls > label::before {
  content:"";
  position:absolute;
  left:2px;
  top:0;
  width:8px;
  height:25px;
  background:var(--pink);
  transform:skew(-15deg);
}
.month-controls {
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
}
.month-controls input,.show-all {
  height:58px;
  border-radius:11px;
  background:#020202;
  color:#fff;
  font-weight:900;
}
.month-controls input {
  min-width:0;
  border:1px solid var(--cyan);
  padding:0 20px;
  color-scheme:dark;
  font-size:21px;
}
.show-all {
  border:1px solid #777;
  padding:0 20px;
  font-size:16px;
}
.show-all.active {
  border-color:var(--cyan);
  color:var(--cyan);
  background:#062027;
}

.schedule-summary {
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:18px;
  margin:24px 4px 12px;
}
.schedule-view .home-schedule-list { margin-top:12px; }
.schedule-view .home-schedule-card { cursor:pointer; }
.schedule-view .home-schedule-card:hover,
.schedule-view .home-schedule-card:focus-visible {
  border-color:currentColor;
  outline:none;
  box-shadow:0 0 14px color-mix(in srgb,currentColor 30%,transparent);
}
.schedule-count { font-size:24px; white-space:nowrap; }
.type-legend {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.type-legend span {
  display:grid;
  place-items:center;
  min-height:34px;
  border:1px solid currentColor;
  border-radius:7px;
  font-size:14px;
  font-weight:900;
}
.studio { color:var(--cyan); }
.live { color:var(--pink); }
.other { color:var(--yellow); }

.schedule-list { display:grid; gap:10px; }
.schedule-card {
  position:relative;
  display:grid;
  grid-template-columns:116px 114px minmax(0,1fr) 28px;
  align-items:center;
  gap:16px;
  min-height:112px;
  width:100%;
  padding:15px 18px 15px 22px;
  overflow:hidden;
  border:1px solid var(--line);
  border-left:8px solid currentColor;
  border-radius:13px;
  background:linear-gradient(105deg,#090b0c,#020202);
  font:inherit;
  text-align:left;
}
.schedule-card:hover,.schedule-card:focus-visible {
  border-color:currentColor;
  outline:none;
  box-shadow:0 0 14px color-mix(in srgb,currentColor 30%,transparent);
}
.card-date {
  color:#fff;
  font-size:23px;
  font-weight:1000;
  white-space:nowrap;
}
.type-badge {
  display:grid;
  place-items:center;
  min-height:38px;
  padding:5px 8px;
  border:2px solid currentColor;
  border-radius:7px;
  font-size:15px;
  font-weight:1000;
  white-space:nowrap;
}
.card-content { min-width:0; color:#fff; }
.card-content strong {
  display:block;
  overflow:hidden;
  font-size:23px;
  font-weight:1000;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.card-meta {
  display:flex;
  flex-wrap:wrap;
  gap:5px 18px;
  margin-top:8px;
  color:#ddd;
  font-size:15px;
  font-weight:700;
}
.card-notes {
  display:-webkit-box;
  margin-top:8px;
  overflow:hidden;
  color:#aaa;
  font-size:13px;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.card-arrow {
  justify-self:end;
  color:currentColor;
  font:300 34px/1 Arial,sans-serif;
}
.empty-state {
  display:grid;
  place-items:center;
  min-height:220px;
  padding:28px;
  border:1px dashed #666;
  border-radius:13px;
  color:#aaa;
  text-align:center;
}
.empty-state strong { display:block; margin-bottom:8px; color:#fff; font-size:22px; }
.empty-state p { margin:0; line-height:1.7; }
.primary-button {
  width:100%;
  min-height:70px;
  margin-top:18px;
  border:1px solid var(--pink);
  border-radius:13px;
  background:linear-gradient(110deg,#ff006d,#ff2874);
  color:#050505;
  font-size:28px;
  font-weight:1000;
}

.schedule-dialog {
  position:fixed;
  inset:0;
  z-index:80;
  overflow:auto;
  padding:24px;
  background:rgba(0,0,0,.92);
  backdrop-filter:blur(5px);
}
.schedule-dialog[hidden] { display:none; }
.form-panel {
  width:min(100%,660px);
  margin:0 auto;
  padding:25px;
  border:2px solid var(--pink);
  border-radius:17px;
  background:#070707;
  box-shadow:0 0 28px rgba(255,0,109,.28);
}
.form-header {
  display:grid;
  grid-template-columns:1fr 52px;
  align-items:start;
  gap:18px;
  margin-bottom:22px;
  padding-bottom:17px;
  border-bottom:2px solid var(--pink);
}
.form-header p {
  margin:0 0 5px;
  color:var(--cyan);
  font:900 12px/1 Arial,sans-serif;
  letter-spacing:.13em;
}
.form-header h2 { margin:0; font-size:31px; }
.dialog-close {
  display:grid;
  place-items:center;
  width:50px;
  height:50px;
  padding:0;
  border:2px solid var(--pink);
  border-radius:12px;
  background:#050505;
  color:#fff;
  font:400 34px/1 Arial,sans-serif;
}
.schedule-form { display:grid; gap:16px; }
.form-field { display:grid; gap:7px; }
.form-field > span {
  color:#fff;
  font-size:16px;
  font-weight:900;
}
.form-field input,.form-field select,.form-field textarea {
  width:100%;
  border:1px solid #777;
  border-radius:9px;
  background:#020202;
  color:#fff;
  color-scheme:dark;
}
.form-field input,.form-field select {
  height:52px;
  padding:0 14px;
}
.form-field textarea {
  min-height:108px;
  padding:13px 14px;
  resize:vertical;
  line-height:1.5;
}
.schedule-dialog[data-type="studio"] .form-panel { border-color:var(--cyan); box-shadow:0 0 28px rgba(0,200,238,.25); }
.schedule-dialog[data-type="live"] .form-panel { border-color:var(--pink); }
.schedule-dialog[data-type="other"] .form-panel { border-color:var(--yellow); box-shadow:0 0 28px rgba(255,225,0,.2); }
.time-fields {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.form-actions {
  display:grid;
  grid-template-columns:auto 1fr 1.25fr;
  gap:10px;
  margin-top:5px;
}
.form-actions button {
  min-height:54px;
  border-radius:9px;
  font-weight:1000;
}
.delete-schedule { border:1px solid var(--pink); background:#080808; color:var(--pink); padding:0 18px; }
.cancel-schedule { border:1px solid #777; background:#080808; color:#fff; }
.save-schedule { border:1px solid var(--pink); background:var(--pink); color:#050505; }
.toast {
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:100;
  max-width:90vw;
  padding:11px 20px;
  transform:translate(-50%,20px);
  opacity:0;
  background:#fff;
  color:#080808;
  font-weight:900;
  white-space:nowrap;
  transition:.2s;
}
.toast.show { transform:translate(-50%,0); opacity:1; }

@media (max-width:600px) {
  .schedule-app { padding:12px 12px 26px; }
  .page-header {
    grid-template-columns:50px 1fr 50px;
    min-height:64px;
    padding-bottom:8px;
    border-bottom-width:2px;
  }
  .page-header h1 { font-size:22px; }
  .header-button {
    width:46px;
    height:46px;
    border-radius:12px;
    font-size:35px;
  }
  .schedule-view > h2 { margin:20px 0 13px; font-size:24px; }
  .schedule-controls > label { font-size:17px; }
  .schedule-controls > label::before { width:7px; height:21px; }
  .month-controls { gap:7px; }
  .month-controls input,.show-all { height:49px; border-radius:9px; }
  .month-controls input { padding:0 12px; font-size:17px; }
  .show-all { padding:0 11px; font-size:12px; }
  .schedule-summary { grid-template-columns:1fr; gap:8px; margin:17px 2px 9px; }
  .schedule-count { font-size:18px; }
  .type-legend { gap:5px; }
  .type-legend span { min-height:27px; border-radius:6px; font-size:10px; }
  .schedule-list { gap:7px; }
  .schedule-card {
    grid-template-columns:1fr auto 24px;
    gap:7px 9px;
    min-height:102px;
    padding:11px 11px 11px 13px;
    border-left-width:6px;
    border-radius:10px;
  }
  .card-date { font-size:16px; }
  .type-badge { min-height:29px; padding:3px 7px; border-width:1px; font-size:10px; }
  .card-content { grid-column:1/3; }
  .card-content strong { font-size:18px; }
  .card-meta { gap:3px 12px; margin-top:5px; font-size:12px; }
  .card-notes { margin-top:5px; font-size:11px; -webkit-line-clamp:1; }
  .card-arrow { grid-column:3; grid-row:1/3; align-self:center; font-size:28px; }
  .empty-state { min-height:190px; padding:22px; }
  .empty-state strong { font-size:19px; }
  .empty-state p { font-size:13px; }
  .primary-button { min-height:54px; margin-top:12px; border-radius:9px; font-size:21px; }

  .schedule-dialog { padding:10px; }
  .form-panel { padding:18px 14px; border-radius:13px; }
  .form-header { grid-template-columns:1fr 46px; margin-bottom:17px; padding-bottom:13px; }
  .form-header h2 { font-size:25px; }
  .dialog-close { width:44px; height:44px; border-radius:10px; font-size:30px; }
  .schedule-form { gap:12px; }
  .form-field > span { font-size:14px; }
  .form-field input,.form-field select { height:47px; padding:0 11px; }
  .form-field textarea { min-height:92px; padding:11px; }
  .time-fields { gap:8px; }
  .form-actions { grid-template-columns:1fr 1.25fr; gap:8px; }
  .form-actions button { min-height:49px; font-size:14px; }
  .delete-schedule { grid-column:1/-1; }
}
