:root{
  color-scheme:light dark;
  --bg:#f7f5f0;
  --surface:#fffefa;
  --ink:#302d28;
  --muted:#756f65;
  --line:#e3ded5;
  --accent:#745045;
  --accent-hover:#593b33;
  --soft:#f0e8df;
  --green:#55725e;
  --danger:#a13f3f;
  --shadow:0 8px 32px #35291c05;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;
  font-synthesis:none
}
*{
  box-sizing:border-box
}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-size:14px;
  line-height:1.7
}
a{
  color:inherit;
  text-underline-offset:4px
}
button,input,textarea{
  font:inherit
}
button,a,input,textarea{
  -webkit-tap-highlight-color:transparent
}
button{
  cursor:pointer
}
button:disabled{
  cursor:wait;
  opacity:.6
}
:focus-visible{
  outline:3px solid var(--accent);
  outline-offset:4px
}
[hidden]{
  display:none!important
}
h1,h2,h3,p{
  margin-top:0
}
h1{
  font-size:clamp(28px,3.2vw,42px);
  font-weight:650;
  line-height:1.5;
  letter-spacing:-.04em;
  margin-bottom:14px
}
h2{
  font-size:17px;
  line-height:1.6;
  margin-bottom:0;
  font-weight:650
}
h3{
  font-size:15px
}
code{
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-weight:500
}
fieldset{
  padding:0;
  margin:0;
  border:0;
  min-width:0
}
.site-header{
  height:80px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 48px;
  border-bottom:1px solid var(--line);
  background:var(--surface)
}
.brand{
  font-size:20px;
  letter-spacing:-.6px;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:650
}
.brand-mark{
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:11px;
  background:var(--accent);
  color:#fffaf4;
  font-size:27px;
  line-height:1;
  font-family:Georgia,serif;
  padding-bottom:5px
}
.brand-mark.large{
  width:55px;
  height:55px;
  font-size:40px;
  margin-bottom:24px
}
.header-actions{
  display:flex;
  gap:18px;
  align-items:center
}
.header-actions form{
  margin:0
}
.account,.dev-badge{
  font-size:12px;
  color:var(--muted)
}
.dev-badge{
  padding:3px 9px;
  border:1px solid var(--line);
  border-radius:5px
}
main{
  max-width:1240px;
  margin:auto;
  padding:38px 40px 76px;
  min-height:calc(100vh - 150px)
}
.site-footer{
  max-width:1160px;
  margin:0 auto;
  padding:22px 0;
  display:flex;
  justify-content:space-between;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px
}
.eyebrow{
  font-size:11px;
  letter-spacing:.17em;
  color:var(--accent);
  font-weight:700;
  margin-bottom:16px
}
.hero{
  padding:38px 0 48px
}
.hero h1{
  font-size:clamp(35px,4.2vw,54px)
}
.lead{
  font-size:15px;
  color:var(--muted);
  line-height:1.9;
  margin-bottom:0
}
.section-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:20px
}
.muted,.fine{
  color:var(--muted)
}
.muted{
  font-size:12px
}
.fine{
  font-size:12px;
  line-height:1.85
}
.tool-card{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:28px;
  max-width:640px;
  padding:32px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  text-decoration:none;
  box-shadow:var(--shadow);
  transition:border-color .2s,transform .2s
}
.tool-card:hover{
  transform:translateY(-2px);
  border-color:var(--accent)
}
.tool-card h3{
  font-size:23px;
  margin-bottom:12px
}
.tool-card p:not(.eyebrow){
  color:var(--muted);
  font-size:14px;
  margin-bottom:20px
}
.tool-card .eyebrow{
  margin-bottom:6px
}
.tool-icon{
  width:54px;
  height:54px;
  flex-shrink:0;
  display:grid;
  place-items:center;
  background:var(--soft);
  color:var(--accent);
  border-radius:15px;
  font-size:30px
}
.card-arrow{
  position:absolute;
  right:28px;
  top:24px;
  color:var(--muted);
  font-size:22px
}
.pill{
  display:inline-flex;
  align-items:center;
  font-size:11px;
  white-space:nowrap;
  border-radius:30px;
  padding:4px 10px;
  background:var(--soft);
  color:var(--accent);
  font-weight:500
}
.breadcrumb{
  display:flex;
  gap:12px;
  color:var(--muted);
  font-size:12px;
  margin-bottom:32px;
  flex-wrap:wrap
}
.breadcrumb a{
  text-decoration:none
}
.breadcrumb a:hover{
  text-decoration:underline
}
.page-heading{
  margin-bottom:34px
}
.page-heading h1{
  font-size:32px
}
.page-heading .eyebrow{
  margin-bottom:8px
}
.workspace{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:24px;
  align-items:start
}
.panel{
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  padding:28px;
  box-shadow:var(--shadow)
}
.editor-panel .section-heading{
  padding-bottom:20px;
  border-bottom:1px solid var(--line)
}
label{
  display:block;
  font-size:13px;
  font-weight:600;
  margin-bottom:9px
}
textarea,input{
  background:var(--bg);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:7px;
  padding:12px 14px;
  width:100%;
  min-width:0;
  outline:none
}
textarea{
  resize:vertical;
  line-height:1.9;
  display:block
}
input{
  height:46px
}
textarea:focus,input:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 2px var(--soft)
}
textarea::placeholder,input::placeholder{
  color:var(--muted);
  opacity:.8;
  font-size:13px
}
.field-meta{
  text-align:right;
  color:var(--muted);
  font-size:11px;
  margin:7px 0 24px;
  font-variant-numeric:tabular-nums
}
.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px
}
.form-grid+.fine{
  margin:12px 0 28px
}
.form-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding-top:20px;
  border-top:1px solid var(--line)
}
.button{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  min-height:44px;
  white-space:nowrap;
  border:1px solid transparent;
  padding:10px 19px;
  border-radius:7px;
  font-size:13px;
  line-height:1.5;
  text-decoration:none;
  font-weight:550;
  transition:background .15s
}
.button.primary{
  background:var(--accent);
  color:#fffaf4
}
.button.primary:hover{
  background:var(--accent-hover)
}
.button.secondary{
  background:var(--surface);
  border-color:var(--line);
  color:var(--ink)
}
.button.secondary:hover,.button.quiet:hover{
  background:var(--soft)
}
.button.quiet{
  background:transparent;
  color:var(--muted)
}
.button.small{
  font-size:12px;
  min-height:34px;
  padding:6px 11px
}
.button.danger{
  color:var(--danger)
}
.button.solid{
  color:#fff;
  background:var(--danger)
}
.button.wide{
  width:100%
}
.button-group{
  display:flex;
  justify-content:flex-end;
  gap:10px
}
.status{
  font-size:13px;
  color:var(--green);
  margin:18px 0 0;
  overflow-wrap:anywhere
}
.status:empty{
  display:none
}
.status.error{
  color:var(--danger)
}
.aside-stack{
  display:grid;
  gap:26px
}
.saved-panel{
  padding:24px
}
.saved-panel .section-heading h2{
  font-size:15px
}
.empty-state{
  text-align:center;
  padding:30px 0 18px
}
.empty-state>span{
  font-size:35px;
  display:inline-block;
  color:var(--muted);
  margin-bottom:10px
}
.empty-state h3{
  font-size:14px;
  margin-bottom:8px
}
.empty-state p{
  font-size:12px;
  color:var(--muted);
  line-height:1.9;
  margin:0
}
.how-it-works{
  padding:0 18px
}
.how-it-works h3{
  font-size:13px;
  margin-bottom:20px
}
.how-it-works ol{
  list-style:none;
  counter-reset:step;
  padding:0;
  margin:0
}
.how-it-works li{
  position:relative;
  padding:0 0 24px 36px;
  counter-increment:step
}
.how-it-works li:before{
  content:counter(step);
  position:absolute;
  left:0;
  top:0;
  width:22px;
  height:22px;
  border:1px solid var(--line);
  border-radius:50%;
  text-align:center;
  font-size:11px;
  color:var(--muted)
}
.how-it-works b{
  font-size:12px;
  display:block;
  font-weight:550
}
.how-it-works li span{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:3px
}
.record-list{
  list-style:none;
  margin:0;
  padding:0
}
.record-list li+li{
  border-top:1px solid var(--line)
}
.record-list a{
  display:block;
  padding:14px 0;
  text-decoration:none
}
.record-list a:hover .record-name{
  color:var(--accent);
  text-decoration:underline
}
.record-name{
  display:block;
  font-size:13px;
  margin-bottom:5px;
  overflow-wrap:anywhere
}
.title-field{
  margin-bottom:22px
}
.title-help{
  margin:8px 0 0
}
.record-heading{
  min-width:0;
  overflow-wrap:anywhere
}
.record-meta{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:4px;
  font-size:10px;
  color:var(--muted)
}
.pagination{
  display:flex;
  justify-content:space-between;
  font-size:12px;
  gap:10px;
  margin-top:18px
}
.read-panel{
  max-width:850px
}
.read-panel form{
  margin-top:28px
}
.read-actions{
  display:flex;
  gap:12px
}
.read-actions input{
  flex:1;
  min-width:0
}
.record-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:28px;
  font-size:12px
}
#revealed{
  margin-top:30px
}
#revealed .section-heading{
  margin-bottom:12px
}
#revealed label{
  margin:0
}
#revealed .fine{
  margin:10px 0 0
}
.login-layout{
  display:grid;
  grid-template-columns:1fr 430px;
  align-items:center;
  gap:65px;
  padding:80px 20px
}
.login-panel{
  text-align:center;
  padding:40px
}
.login-panel h2{
  font-size:20px;
  margin-bottom:12px
}
.login-panel>.muted{
  margin-bottom:26px;
  font-size:13px
}
.login-panel .fine{
  margin:24px 0 0
}
.dev-login{
  margin-top:16px;
  display:grid;
  justify-items:center;
  gap:10px
}
.notice{
  background:var(--soft);
  padding:14px;
  border-radius:7px;
  font-size:13px
}
.narrow{
  max-width:600px;
  margin:50px auto
}
.narrow h1{
  font-size:26px
}
dialog{
  max-width:440px;
  width:calc(100% - 32px);
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  color:var(--ink);
  padding:28px
}
dialog::backdrop{
  background:#17131088
}
dialog h2{
  margin-bottom:12px
}
dialog p{
  font-size:13px;
  color:var(--muted);
  margin-bottom:24px
}
.tool-grid{
  display:grid;
  gap:18px
}
.main-stack{
  display:grid;
  gap:24px;
  min-width:0
}
.side-panel{
  padding:24px
}
.side-panel .section-heading h2{
  font-size:15px
}
.flash{
  border:1px solid var(--line);
  border-left:4px solid var(--green);
  border-radius:10px;
  background:var(--surface);
  padding:16px 18px;
  margin-bottom:24px;
  font-size:13px;
  overflow-wrap:anywhere
}
.flash.error{
  border-left-color:var(--danger)
}
.flash p{
  margin-bottom:0
}
.flash label{
  margin:14px 0 6px
}
.mono{
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:12px
}
.item-list{
  list-style:none;
  margin:0 0 20px;
  padding:0
}
.item-list li{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px 0
}
.item-list li+li{
  border-top:1px solid var(--line)
}
.item-list.compact li{
  padding:10px 0
}
.item-main{
  min-width:0;
  flex:1
}
.item-actions{
  display:flex;
  gap:6px;
  flex-shrink:0
}
.item-list .record-meta{
  font-size:11px
}
.error-text{
  color:var(--danger);
  margin:6px 0 0
}
.pill.ok{
  color:var(--green)
}
.pill.danger{
  color:var(--danger)
}
.pill.quiet{
  color:var(--muted)
}
.tabs{
  display:flex;
  gap:4px;
  border-bottom:1px solid var(--line);
  margin-bottom:4px
}
.tabs a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px 10px;
  margin-bottom:-1px;
  border-bottom:2px solid transparent;
  color:var(--muted);
  font-weight:600;
  text-decoration:none
}
.tabs a:hover{
  color:var(--ink)
}
.tabs a[aria-current=page]{
  color:var(--accent);
  border-bottom-color:var(--accent)
}
.tab-count{
  min-width:22px;
  padding:0 7px;
  border-radius:30px;
  background:var(--soft);
  font-size:11px;
  font-weight:500;
  line-height:20px;
  text-align:center;
  font-variant-numeric:tabular-nums
}
.item-list.notification-list details{
  border:0;
  padding:0;
  margin:0
}
.notification-list summary{
  position:relative;
  padding-right:24px;
  font-weight:inherit;
  list-style:none
}
.notification-list summary::-webkit-details-marker{
  display:none
}
.notification-list summary:after{
  content:"";
  position:absolute;
  right:4px;
  top:7px;
  width:7px;
  height:7px;
  border-right:1.5px solid var(--muted);
  border-bottom:1.5px solid var(--muted);
  transform:rotate(45deg);
  transition:transform .2s
}
.notification-list details[open]>summary:after{
  top:11px;
  transform:rotate(225deg)
}
.notification-list summary:hover .record-name{
  color:var(--accent)
}
/* 取り消しボタンは右上に固定し、開いた本文は行の全幅を使う */
.notification-list li.cancellable{
  position:relative
}
.notification-list li.cancellable>form{
  position:absolute;
  top:14px;
  right:0
}
.notification-list li.cancellable summary{
  padding-right:112px
}
.notification-list li.cancellable summary:after{
  right:88px
}
.notification-list .error-text{
  display:block
}
.mail-body{
  margin:12px 0 6px;
  padding:14px;
  max-height:360px;
  overflow-y:auto;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:7px;
  font-size:13px;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.mail-body+.fine{
  margin:0
}
.stack-form{
  display:grid;
  gap:10px;
  margin-bottom:8px
}
.stack-form label{
  margin-bottom:0
}
select{
  font:inherit;
  height:46px;
  width:100%;
  padding:0 12px;
  background:var(--bg);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:7px
}
select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 2px var(--soft);
  outline:none
}
#setup input{
  margin-bottom:10px
}
details{
  border-top:1px solid var(--line);
  padding:12px 0
}
details:last-of-type{
  border-bottom:1px solid var(--line);
  margin-bottom:16px
}
summary{
  cursor:pointer;
  font-weight:600
}
details ol{
  margin:10px 0 0;
  padding-left:22px
}
pre{
  margin:10px 0;
  padding:14px;
  overflow-x:auto;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:7px;
  font-size:12px;
  line-height:1.6
}
.visually-hidden{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap
}
.consent h1{
  font-size:24px
}
.consent-list{
  padding-left:22px
}
.consent-detail{
  margin:0 0 20px
}
.consent-detail dt{
  font-size:12px;
  color:var(--muted)
}
.consent-detail dd{
  margin:4px 0 0;
  overflow-wrap:anywhere
}
.consent .notice{
  margin-bottom:16px
}
@media(prefers-color-scheme:dark){
  :root{
    --bg:#211f1d;
    --surface:#292623;
    --ink:#eee8df;
    --muted:#b6aca0;
    --line:#413b35;
    --accent:#c99c87;
    --accent-hover:#b28671;
    --soft:#393029;
    --green:#a1c6a8;
    --danger:#ec9794;
    --shadow:none
  }
  .button.primary{
    color:#261b16
  }
  .button.solid{
    color:#271311
  }
  .brand-mark{
    background:#876457
  }
  .tool-card:hover{
    border-color:#826a5f
  }
}
@media(max-width:1000px){
  .workspace{
    grid-template-columns:minmax(0,1fr) 285px;
    gap:18px
  }
  .form-grid{
    grid-template-columns:1fr
  }
  .form-footer{
    align-items:stretch;
    flex-direction:column
  }
  .login-layout{
    gap:30px;
    grid-template-columns:1fr 380px;
    padding:40px 0
  }
  .panel{
    padding:24px
  }
  .site-header{
    padding:0 28px
  }
  .site-footer{
    margin:0 40px
  }
}
@media(max-width:760px){
  .site-header{
    height:auto;
    min-height:68px;
    flex-wrap:wrap;
    gap:8px 16px;
    padding:14px 20px
  }
  .brand{
    font-size:18px;
    gap:8px;
    white-space:nowrap;
    flex-shrink:0
  }
  .brand-mark{
    width:30px;
    height:30px;
    font-size:24px
  }
  .header-actions{
    gap:8px;
    margin-left:auto;
    flex-shrink:0
  }
  .account{
    display:none
  }
  .dev-badge{
    font-size:10px;
    padding:2px 6px
  }
  main{
    padding:26px 20px 50px
  }
  .site-footer{
    margin:0 20px;
    font-size:11px
  }
  .workspace,.login-layout{
    grid-template-columns:1fr
  }
  .hero{
    padding:24px 0 35px
  }
  .hero h1{
    font-size:38px
  }
  .tool-card{
    padding:25px 22px;
    gap:18px
  }
  .tool-card h3{
    font-size:20px
  }
  .tool-icon{
    width:42px;
    height:42px;
    font-size:26px
  }
  .tool-card p:not(.eyebrow){
    font-size:12px
  }
  .card-arrow{
    right:20px;
    top:18px
  }
  .breadcrumb{
    margin-bottom:26px;
    gap:8px;
    font-size:11px
  }
  .page-heading h1{
    font-size:28px
  }
  .lead{
    font-size:13px
  }
  .panel{
    padding:22px 18px
  }
  .form-grid{
    grid-template-columns:1fr
  }
  .read-actions{
    flex-direction:column
  }
  .read-actions input{
    flex:auto
  }
  .read-panel .section-heading{
    flex-wrap:wrap;
    gap:8px
  }
  .login-layout{
    padding:18px 0;
    gap:32px
  }
  .login-layout h1{
    font-size:31px
  }
  .login-panel{
    padding:30px 24px
  }
  .button-group{
    gap:6px
  }
  .record-footer{
    flex-wrap:wrap
  }
  .editor-panel .section-heading{
    gap:8px
  }
  .editor-panel .section-heading h2{
    font-size:15px
  }
  .pill{
    font-size:10px
  }
  /* 3つのタブを等幅にして1行に収める */
  .tabs a{
    flex:1 1 0;
    justify-content:center;
    gap:6px;
    padding:8px 4px 10px;
    font-size:13px;
    white-space:nowrap
  }
}
@media(prefers-reduced-motion:reduce){
  *{
    transition:none!important
  }
}
