:root{--ink:#534d45;--muted:#91877b;--green:#b47791;--deep:#8a5870;--pale:#f8eaf0;--cream:#f7eee8;--paper:#fffafd;--line:#eadbe2;--shadow:0 12px 34px rgba(91,75,51,.10);--gold:#c7a86c}
*{box-sizing:border-box}
html{background:#eee8df}
body{margin:0;background:#eee8df;color:var(--ink);font-family:"Hiragino Sans","Yu Gothic",sans-serif}
button,input{font:inherit;color:inherit}button{touch-action:manipulation}
.shell{width:min(100%,480px);min-height:100dvh;margin:auto;padding:12px 16px 96px;background:linear-gradient(#fffafd,#f7f1eb)}
.card{margin-top:10px;padding:17px;background:rgba(255,255,255,.91);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
h2{margin:3px 0 13px;font:600 19px/1.5 serif}.eyebrow{margin:0;color:#9b7b89;letter-spacing:.12em;font-size:11px}
.primary{border:0;border-radius:999px;padding:13px 16px;color:#fff;background:linear-gradient(135deg,#c4829d,#9b627f);box-shadow:0 7px 16px rgba(155,98,127,.22);cursor:pointer}.primary:disabled{opacity:.42;cursor:not-allowed}
.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:52px;padding:4px 5px 5px;border-bottom:1px solid rgba(207,181,193,.45)}
.calendar-toolbar-title{display:flex;align-items:center;gap:9px;min-width:0}.calendar-toolbar-mark{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border:1px solid #ead4df;border-radius:50%;background:rgba(255,255,255,.82);color:#b57996;box-shadow:0 4px 12px rgba(122,76,99,.07)}
.calendar-toolbar-mark svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.calendar-toolbar-title h1{margin:0;color:#654a57;font:500 17px/1.35 serif;letter-spacing:.06em;white-space:nowrap}
.calendar-toolbar-actions{display:flex;gap:5px;flex:0 0 auto}.calendar-data-button{min-height:34px;padding:7px 11px;border:1px solid rgba(180,119,145,.28);border-radius:999px;background:rgba(255,255,255,.8);color:#795d69;font-size:10px;font-weight:700;letter-spacing:.04em;cursor:pointer}.calendar-data-button:hover,.calendar-data-button:focus-visible{border-color:#b47791;background:#fff7fa}.calendar-data-button:focus-visible,.primary:focus-visible{outline:2px solid #bd8ba1;outline-offset:2px}
.today-card{text-align:left}.record-date-line{display:flex;align-items:center;justify-content:center;text-align:center}.record-date-line #todayLabel{color:#654a57;font:600 19px/1.5 serif;letter-spacing:.04em}.record-form{margin-top:8px}
.record-metric-tabs,.metric-tabs,.range-tabs{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none}.record-metric-tabs::-webkit-scrollbar,.metric-tabs::-webkit-scrollbar,.range-tabs::-webkit-scrollbar{display:none}.record-metric-tabs{justify-content:center;margin:2px 0 14px}.record-metric-tabs button,.metric-tabs button,.range-tabs button{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;background:#fff;color:#887f74;cursor:pointer}.record-metric-tabs button{padding:7px 11px;font-size:9px}.metric-tabs button,.range-tabs button{padding:7px 13px;font-size:9px}.record-metric-tabs button.active,.metric-tabs button.active,.range-tabs button.active{border-color:var(--green);background:var(--pale);color:var(--deep);font-weight:700}.record-metric-tabs button{position:relative}.record-metric-tabs button.has-draft:after{content:"";position:absolute;top:-3px;right:-2px;width:8px;height:8px;border:2px solid #fff;border-radius:50%;background:#d99a58;box-shadow:0 1px 4px rgba(117,78,38,.2)}
.measurement-fields{min-height:68px;display:grid;place-items:center}.performance-stepper{display:grid;grid-template-columns:34px minmax(0,240px) 34px;align-items:center;justify-content:center;gap:6px;width:100%}.performance-stepper>button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid #e5d7de;border-radius:50%;background:#fff9fc;color:#8a5870;font-size:9px;cursor:pointer}.performance-stepper>button:active{background:var(--pale);transform:scale(.96)}
.athletics-input{display:flex;align-items:baseline;justify-content:center;min-width:0;border-bottom:1px solid #ddcfd6;transition:border-color .18s,box-shadow .18s}.athletics-input:focus-within{border-bottom-color:#b47791;box-shadow:0 1px 0 rgba(180,119,145,.16)}.athletics-input input{width:100%;min-width:0;border:0;outline:0;background:transparent;text-align:center;font:500 34px/1.4 serif;cursor:text;-moz-appearance:textfield}.athletics-input input::placeholder{color:#b79aa7;opacity:0;transition:opacity .16s}.athletics-input input:focus::placeholder{opacity:.38}.athletics-input span{margin-left:6px;color:#76646d;font-size:14px;white-space:nowrap}
.record-save,.daily-save{position:relative;display:block;width:100%;margin-top:14px}.record-save.has-draft:after,.daily-save.has-draft:after{content:"";position:absolute;top:5px;right:9px;width:9px;height:9px;border:2px solid rgba(255,255,255,.9);border-radius:50%;background:#efb15f;box-shadow:0 1px 5px rgba(89,55,24,.22)}.save-message,.daily-message{min-height:16px;margin:7px 0 -7px;color:var(--deep);font-size:10px;text-align:center}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:16px;text-align:center}.outside-stats{margin:10px 3px 0}.stats div{padding:9px 4px;border:1px solid #e8dfe3;border-radius:13px;background:#fbf7f9;box-shadow:0 3px 9px rgba(89,103,83,.04)}.stats small{display:block;color:var(--muted);font-size:9px}.stats strong{display:block;margin-top:3px;font-family:serif;font-size:14px;line-height:1.4}.stats strong.positive{color:#7f5d6d}
.recent-card{padding:15px 17px}.seven-day-overview{display:grid;grid-template-columns:42px repeat(7,minmax(0,1fr));align-items:center;gap:5px 3px;margin:0}.overview-weekday{text-align:center;color:#5e5b56;font-size:10px;font-weight:700}.overview-weekday.is-today{color:#8a5870;text-decoration:underline;text-decoration-color:#d6a9bc;text-decoration-thickness:2px;text-underline-offset:3px}.overview-row-label{color:#69645e;font-size:9px;font-weight:700;text-align:left}.overview-value{display:grid;place-items:center;min-width:0;height:30px;padding:2px;border:1px solid #eee5e9;border-radius:9px;background:#fff;color:#7d6a73;font-size:8px;line-height:1.2;text-align:center}.overview-value.has-value{border-color:#ddc2cf;background:#fbf1f5;color:#775463;font-weight:700}
.section-head,.month-head{display:flex;align-items:center;justify-content:space-between}.section-head h2{margin-bottom:0}.detail-card .section-head{justify-content:center}.detail-card .section-head h2{width:100%;text-align:center}.graph-event-tabs,.graph-range-tabs{justify-content:center}.graph-event-tabs{margin-top:0}.graph-range-tabs{margin-top:8px}.graph-wrap{height:190px;margin-top:14px}.graph-wrap svg{display:block;width:100%;height:100%;overflow:visible}.grid-line{stroke:#e8e1e5;stroke-width:1}.record-line{fill:none;stroke:#b47791;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.record-dot{fill:#fff;stroke:#8a5870;stroke-width:2}.best-line{stroke:#9a7d8b;stroke-width:1.2;stroke-dasharray:3 4}.target-line{stroke:var(--gold);stroke-width:1.2;stroke-dasharray:6 4}.graph-label{fill:#8c8287;font-size:9px}.graph-key{display:flex;justify-content:flex-end;gap:12px;min-height:15px;margin-top:4px;color:#93858c;font-size:8px}.graph-key span:before{content:"";display:inline-block;width:12px;margin-right:4px;border-top:1px dashed currentColor;vertical-align:middle}.graph-key .target-key{color:#9d844e}.empty-graph{height:100%;display:grid;place-items:center;padding:12px;color:var(--muted);font-size:11px;line-height:1.8;text-align:center;background:#fbf8fa;border-radius:15px}
.month-head h2{margin:0}.month-head button{padding:3px 13px;border:0;background:transparent;font-size:28px;cursor:pointer}.week,.days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.week span{padding:8px 0 4px;text-align:center;color:var(--muted);font-size:10px}.days button{position:relative;display:flex;height:47px;padding:5px 2px 7px;flex-direction:column;align-items:center;justify-content:flex-start;gap:1px;border:0;border-radius:11px;background:#f7f9f7;font-size:12px;cursor:pointer}.days button .day-number{line-height:1.15}.days button .day-record{max-width:100%;overflow:hidden;color:#765663;font-size:7px;font-weight:700;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.days button.recorded:after{content:"";position:absolute;bottom:4px;left:50%;z-index:2;width:4px;height:4px;border-radius:50%;background:var(--green);transform:translateX(-50%)}.days button.selected{outline:2px solid var(--green);outline-offset:1px}.days button.today .day-number{font-weight:700;text-decoration:underline}.days i{display:block}.calendar-note{margin:8px 2px 0;text-align:right;color:var(--muted);font-size:9px}.calendar-note i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green)}.delete-day-button{display:block;margin:13px auto 0;border:0;background:transparent;color:#a36f71;font-size:10px;cursor:pointer}
dialog{width:min(calc(100% - 28px),430px);max-height:calc(100% - 28px);padding:0;border:0;border-radius:24px;background:transparent}dialog::backdrop{background:rgba(45,55,47,.35);backdrop-filter:blur(3px)}.dialog-card{position:relative;max-height:calc(100vh - 28px);padding:24px;overflow:auto;background:#fffefd;border-radius:24px}.dialog-close{position:absolute;top:13px;right:14px;border:0;background:transparent;font-size:24px;cursor:pointer}.dialog-card h2{margin-bottom:15px}.dialog-card .primary{width:100%}.setting-note{margin:11px 2px;color:#91838a;font-size:9px;line-height:1.7;text-align:center}.data-actions{display:grid;gap:10px}.data-actions button{min-height:52px;padding:12px 14px;border:1px solid #eadbe2;border-radius:15px;background:#fff;color:#6f5c65;font-size:11px;font-weight:700;cursor:pointer}.data-actions .data-delete-button{border-color:#edced5;background:#fff8f8;color:#ad586b}.data-dialog-note{margin:14px 3px 0;color:#94858c;font-size:9px;line-height:1.7;text-align:center}.data-dialog-status{min-height:16px;margin:8px 3px 0;color:#8a5870;font-size:10px;line-height:1.6;text-align:center}
.event-options{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:13px 0 17px}.event-options label{position:relative;display:flex;min-height:43px;align-items:center;justify-content:center;padding:7px 5px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#73656c;font-size:9px;font-weight:700;text-align:center;cursor:pointer}.event-options label:has(input:checked){border-color:#b47791;background:#f8eaf0;color:#7e5368}.event-options input{position:absolute;opacity:0;pointer-events:none}.event-configs{display:grid;gap:9px;margin:0 0 14px}.event-config-card{padding:12px;border:1px solid #eadfe4;border-radius:15px;background:#fff}.event-config-card>strong{display:block;margin-bottom:9px;font:600 14px serif;color:#68545d}.event-config-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.event-config-grid label{display:block;color:#8f8087;font-size:8px}.event-config-grid input{width:100%;margin-top:5px;padding:9px 8px;border:1px solid #eadfe4;border-radius:10px;background:#fff;font-size:15px;text-align:center}.event-config-grid small{display:block;margin-top:4px;color:#a29399;font-size:7px;text-align:center}.event-config-grid small .config-status{font-weight:700;color:#8b6b79}.event-config-empty{padding:13px;color:#978a90;font-size:10px;text-align:center;background:#fbf7f9;border-radius:13px}
.bottom-nav{position:fixed;z-index:50;left:50%;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);width:min(100%,480px);padding:6px 6px calc(6px + env(safe-area-inset-bottom));border-top:1px solid rgba(214,196,205,.9);background:rgba(255,253,253,.96);backdrop-filter:blur(14px);transform:translateX(-50%)}.bottom-nav a{display:flex;height:45px;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:10px;background:transparent;color:#8d7a83;text-decoration:none;font-size:9px;font-weight:800;line-height:1}.bottom-nav b{font-size:9px;font-weight:800;white-space:nowrap}.bottom-nav-icon{position:relative;display:grid;place-items:center;width:20px;height:20px;color:currentColor;font-size:19px;font-weight:500;line-height:1}.record-nav-icon{border:1.8px solid currentColor;border-radius:50%}.record-nav-icon:before{content:"";position:absolute;left:8px;top:4px;width:1.8px;height:6px;border-radius:2px;background:currentColor}.record-nav-icon:after{content:"";position:absolute;left:8px;top:9px;width:5px;height:1.8px;border-radius:2px;background:currentColor;transform:rotate(28deg);transform-origin:left center}.heart-nav-icon{font-family:serif;font-size:22px}.watashi-nav-icon{font-size:18px}.home-nav-icon:before,.home-nav-icon:after{content:"";position:absolute}.home-nav-icon:before{left:3px;top:8px;width:12px;height:9px;border:1.7px solid currentColor;border-top:0;border-radius:1px 1px 3px 3px}.home-nav-icon:after{left:4px;top:4px;width:11px;height:11px;border-left:1.7px solid currentColor;border-top:1.7px solid currentColor;transform:rotate(45deg);transform-origin:center}.bottom-nav a:focus-visible{outline:2px solid #bd8ba1;outline-offset:2px}
@media(min-width:700px){body{padding:28px 0}.shell{min-height:calc(100dvh - 56px);border-radius:30px;box-shadow:0 20px 70px rgba(63,87,68,.13)}}
@media(max-width:390px){.shell{padding-inline:11px}.calendar-toolbar-title h1{font-size:15px;letter-spacing:.03em}.calendar-toolbar-mark{width:28px;height:28px;flex-basis:28px}.calendar-data-button{padding-inline:9px}.event-options{grid-template-columns:repeat(2,1fr)}.event-config-grid{grid-template-columns:1fr}.seven-day-overview{grid-template-columns:36px repeat(7,minmax(0,1fr));gap:4px 1px}.overview-weekday,.overview-row-label{font-size:8px}.overview-value{font-size:7px}.performance-stepper{grid-template-columns:31px minmax(0,1fr) 31px;gap:4px}.performance-stepper>button{width:31px;height:31px}.stats strong{font-size:12px}}


/* v6: カレンダー競技切替・まとめて記録 */
.calendar-event-tabs{justify-content:center;margin:0 0 11px}
.calendar-batch-button{display:block;width:min(100%,210px);min-height:42px;margin:12px auto 0;padding:9px 16px;border:1px solid rgba(180,119,145,.30);border-radius:999px;background:#fff;color:#795d69;font-size:10px;font-weight:700;letter-spacing:.04em;cursor:pointer}
.calendar-batch-button:hover,.calendar-batch-button:focus-visible{border-color:#b47791;background:#fff7fa;outline:none}
.batch-dialog-card{padding-top:22px}
.batch-event-tabs{justify-content:center;margin:11px 0 0}
.batch-range-tabs{justify-content:center;margin-top:8px}
.batch-period-label{margin:10px 0 8px;color:#796a72;font:600 15px/1.5 serif;text-align:center}
.batch-record-list{display:grid;gap:7px;max-height:48vh;margin-top:8px;padding-right:2px;overflow:auto}
.batch-record-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:10px;padding:9px 10px;border:1px solid #eee3e8;border-radius:13px;background:#fff}
.batch-record-date{color:#6d6167;font-size:10px;font-weight:700;white-space:nowrap}
.batch-record-input{display:flex;align-items:baseline;min-width:0;border-bottom:1px solid #dfd1d8}
.batch-record-input:focus-within{border-bottom-color:#b47791}
.batch-record-input input{width:100%;min-width:0;padding:3px 2px 4px;border:0;outline:0;background:transparent;text-align:right;font:500 20px/1.35 serif}
.batch-record-input input::placeholder{color:#b79aa7;opacity:.28}
.batch-record-input em{margin-left:6px;color:#7f6b74;font-size:10px;font-style:normal;white-space:nowrap}
.batch-save{margin-top:14px}
@media(max-width:390px){
  .batch-record-row{grid-template-columns:78px minmax(0,1fr);gap:7px;padding:8px}
  .batch-record-input input{font-size:18px}
}


/* v7: まとめて記録を入力優先のコンパクトUIへ */
.calendar-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
}
.calendar-foot .calendar-note{
  margin:0;
}
.calendar-batch-button{
  width:auto;
  min-width:0;
  min-height:30px;
  margin:0;
  padding:5px 10px;
  border-color:rgba(180,119,145,.24);
  border-radius:999px;
  background:transparent;
  color:#8b737d;
  font-size:9px;
  font-weight:600;
  letter-spacing:.02em;
}
.calendar-batch-button:hover,
.calendar-batch-button:focus-visible{
  border-color:rgba(180,119,145,.48);
  background:#fff9fb;
  color:#725b65;
}

.batch-dialog-card{
  padding-top:18px;
}
.batch-head{
  display:grid;
  grid-template-columns:auto auto 1fr;
  align-items:center;
  gap:8px;
  min-height:34px;
  padding-right:34px;
}
.batch-title{
  color:#7f6b74;
  font-size:10px;
  font-weight:700;
  letter-spacing:.05em;
  white-space:nowrap;
}
.batch-event-name{
  color:#4f4349;
  font-family:serif;
  font-size:16px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
}
.batch-range-tabs{
  justify-self:end;
  justify-content:flex-end;
  margin:0;
}
.batch-range-tabs button{
  min-height:28px;
  padding:4px 10px;
  font-size:9px;
}
.batch-period-label{
  margin:10px 0 7px;
  font-size:14px;
}
.batch-record-list{
  margin-top:5px;
}

@media(max-width:390px){
  .calendar-foot{
    gap:8px;
  }
  .batch-head{
    gap:6px;
    padding-right:30px;
  }
  .batch-title{
    font-size:9px;
  }
  .batch-event-name{
    font-size:15px;
  }
  .batch-range-tabs button{
    padding-right:8px;
    padding-left:8px;
  }
}
