@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Nunito:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0');

:root{
  --paper:#f7f0e0;
  --paper-2:#f0e4ce;
  --ink:#5b3f2b;
  --ink-soft:#7a5a44;
  --line:#9b775d;
  --line-soft:#b49377;
  --accent:#b66f49;
  --accent-strong:#9e5e3c;
  --accent-soft: rgba(182,111,73,0.22);
  --danger:#b35c50;
  --danger-soft: rgba(179,92,80,0.2);
  --success:#5e9468;
  --success-soft: rgba(94,148,104,0.2);
  --shadow: 0 14px 34px rgba(65, 42, 27, 0.22);
  --radius: 22px;
}

*{box-sizing:border-box}
html, body{min-height:100%}
.material-symbols-rounded{
  font-family:"Material Symbols Rounded";
  font-weight:400;
  font-style:normal;
  font-size:20px;
  line-height:1;
  display:inline-block;
  letter-spacing:normal;
  text-transform:none;
  white-space:nowrap;
  word-wrap:normal;
  direction:ltr;
  -webkit-font-smoothing:antialiased;
}
body{
  margin:0;
  font-family:"Nunito","Avenir Next","Trebuchet MS",sans-serif;
  color:var(--ink);
  background:#d7c5a3;
  line-height:1.35;
  position:relative;
  isolation:isolate;
}

.bg-rotator{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}
.bg-rotator__layer{
  position:absolute;
  inset:-2%;
  opacity:0;
  background-size:cover;
  background-position:center;
  transition:opacity var(--bg-fade-ms,10000ms) linear;
  transform:scale(1.03);
}
.bg-rotator__layer.is-active{opacity:1}
.bg-veil{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    radial-gradient(1200px 720px at 50% 0%, rgba(255,245,224,0.3), transparent 65%),
    linear-gradient(180deg, rgba(241,225,197,0.12) 0%, rgba(238,220,188,0.48) 100%);
}

h1,h2,h3{
  font-family:"Baloo 2","Nunito",sans-serif;
  font-weight:700;
  letter-spacing:0.1px;
  margin:0 0 10px;
  color:var(--ink);
}
h1{font-size:42px; line-height:1.04}
h2{font-size:28px; line-height:1.12}
h3{font-size:20px; margin-top:10px}

a{color:var(--accent-strong); text-decoration:none}
a:hover{text-decoration:underline}

.topbar{
  position:sticky;
  top:12px;
  z-index:5;
  margin:12px auto 0;
  max-width:920px;
  width:calc(100% - 24px);
  background:rgba(248,241,228,0.88);
  backdrop-filter: blur(8px);
  border:2px solid var(--line);
  border-radius:18px;
  box-shadow:0 6px 20px rgba(76,52,32,0.12);
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.topbar__left,
.topbar__right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--ink);
  font-family:"Baloo 2","Nunito",sans-serif;
  font-weight:700;
  font-size:28px;
  line-height:1;
  text-decoration:none;
}
.brand:hover{text-decoration:none}
.brand__logo{
  width:51px;
  height:51px;
  object-fit:contain;
  flex:0 0 auto;
}

.home-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:2px solid var(--line-soft);
  background:rgba(255,255,255,0.42);
  color:var(--ink-soft);
  font-size:13px;
  font-weight:700;
}
.home-switcher{margin:0}
.home-switcher select{
  width:auto;
  min-width:180px;
  max-width:280px;
  padding:6px 28px 6px 10px;
  border-radius:999px;
  border:2px solid var(--line-soft);
  background:rgba(255,255,255,0.42);
  color:var(--ink-soft);
  font-size:14px;
  font-weight:700;
  line-height:1.15;
  font-family:"Nunito","Avenir Next",sans-serif;
  background-image:none;
}
.home-switcher select:focus{
  border-color:var(--line);
  box-shadow:0 0 0 3px rgba(182,111,73,0.12);
}

.navlink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 12px;
  border-radius:999px;
  border:2px solid var(--line-soft);
  background:rgba(255,255,255,0.35);
  color:var(--ink-soft);
  font-size:14px;
  font-weight:700;
  text-decoration:none;
}
.navlink:hover{
  text-decoration:none;
  color:var(--ink);
  border-color:var(--line);
}

.container{
  max-width:760px;
  margin:18px auto 0;
  padding:0 12px;
  position:relative;
  z-index:2;
}

.footer{
  padding:18px 12px 34px;
  text-align:center;
  color:rgba(91,63,43,0.75);
  font-weight:700;
  position:relative;
  z-index:2;
}
.footer-card{
  display:inline-block;
  max-width:760px;
  background:rgba(248,241,228,0.88);
  border:2px solid var(--line);
  border-radius:14px;
  box-shadow:0 6px 18px rgba(76,52,32,0.12);
  padding:8px 12px;
}
.footer-card a{
  color:var(--accent-strong);
  font-weight:800;
}

.card{
  background:var(--paper);
  border:2px solid var(--line);
  border-radius:var(--radius);
  padding:16px 16px;
  box-shadow:var(--shadow);
  margin:12px 0;
}
.page-card{
  padding:18px 18px 16px;
}

.pagehead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 0 10px;
  flex-wrap:wrap;
}
.pagehead h1{
  margin:0 0 3px;
  font-size:46px;
  line-height:0.98;
}
.pagehead__actions{display:flex; gap:8px; align-items:center; flex-wrap:wrap}

.page-brand{
  display:flex;
  align-items:center;
  gap:7px;
  font-family:"Baloo 2","Nunito",sans-serif;
  font-size:30px;
  font-weight:700;
  line-height:1;
  color:var(--ink);
  margin:0 0 6px;
}
.system-heading{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.system-heading .page-brand{width:100%}

label{
  display:block;
  margin:10px 0 6px;
  color:var(--ink);
  font-size:24px;
  line-height:1;
  font-family:"Baloo 2","Nunito",sans-serif;
}
input, textarea, select{
  width:100%;
  padding:9px 11px;
  border-radius:12px;
  border:2px solid var(--line);
  background-color:#ffffff;
  background-image:
    linear-gradient(to right, rgba(153,124,99,0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(153,124,99,0.22) 1px, transparent 1px);
  background-size:14px 14px;
  color:var(--ink);
  font-size:18px;
  line-height:1.2;
  outline:none;
  font-family:"Nunito","Avenir Next",sans-serif;
}
input:focus, textarea:focus, select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(182,111,73,0.16);
}
textarea{resize:vertical}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 16px;
  border-radius:999px;
  border:2px solid var(--line);
  background:var(--paper-2);
  color:var(--ink);
  cursor:pointer;
  text-decoration:none;
  font-weight:800;
  font-size:28px;
  line-height:1;
  font-family:"Baloo 2","Nunito",sans-serif;
  transition:transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
.btn:hover{
  text-decoration:none;
  filter:brightness(1.02);
  transform:translateY(-1px);
}
.btn[disabled]{opacity:.65; cursor:wait}
.btn--primary{
  background:linear-gradient(180deg, #c98057 0%, #b56c47 100%);
  border-color:var(--accent-strong);
  color:#fff8ef;
}
.btn--danger{
  background:linear-gradient(180deg, #c26f64 0%, #ab5a50 100%);
  border-color:#8f4941;
  color:#fff6f2;
}
.btn--ghost{background:rgba(255,255,255,0.42)}
.btn--small{
  padding:7px 12px;
  font-size:20px;
}
.btn--icon{
  width:38px;
  height:38px;
  padding:0;
  border-radius:10px;
  font-size:28px;
  font-weight:700;
  line-height:1;
}
.btn--icon-danger:hover{
  border-color:#8f4941;
  background:var(--danger-soft);
}
.btn--icon .material-symbols-rounded{font-size:20px}

.inline-form{margin:0}

.actions{display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; align-items:center}
.ai-status{display:block; min-height:18px; margin-top:6px; color:var(--ink-soft)}
.btn.is-loading{
  position:relative;
  padding-left:36px;
}
.btn.is-loading::before{
  content:"";
  position:absolute;
  left:13px;
  width:14px;
  height:14px;
  border-radius:50%;
  border:2px solid rgba(255,247,235,0.42);
  border-top-color:#fff6ea;
  animation:btn-spin .9s linear infinite;
}
@keyframes btn-spin{to{transform:rotate(360deg)}}

.muted{color:var(--ink-soft)}
.small{font-size:14px}
.pre{white-space:pre-wrap}

.flash-stack{margin:10px 0}
.flash{
  border-radius:14px;
  padding:8px 11px;
  border:2px solid var(--line-soft);
  background:rgba(255,255,255,0.46);
  margin:8px 0;
  font-weight:700;
  font-size:19px;
}
.flash--error{border-color:rgba(179,92,80,0.62); background:var(--danger-soft)}
.flash--success{border-color:rgba(94,148,104,0.62); background:var(--success-soft)}
.flash--info{border-color:rgba(182,111,73,0.56); background:var(--accent-soft)}

.notice{
  padding:10px 12px;
  border-radius:14px;
  border:2px solid var(--line-soft);
  background:rgba(255,255,255,0.46);
  margin:10px 0;
  color:var(--ink);
  font-size:19px;
  font-weight:700;
}

.list{
  border:2px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background:rgba(255,255,255,0.35);
}
.listitem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border-bottom:2px solid rgba(155,119,93,0.48);
  color:var(--ink);
  text-decoration:none;
}
.listitem:last-child{border-bottom:none}
.listitem:hover{
  background:rgba(255,255,255,0.52);
  text-decoration:none;
}
.listitem__left{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:0;
}
.listitem__main{min-width:0}
.listitem__title{
  font-family:"Baloo 2","Nunito",sans-serif;
  font-size:34px;
  line-height:1;
  font-weight:700;
}
.listitem__meta{font-size:14px; color:var(--ink-soft); margin-top:2px}
.listitem__chev{color:var(--ink-soft); font-size:26px; font-weight:700}

.system-icon{
  display:block;
  border:2px solid var(--line-soft);
  border-radius:12px;
  background:rgba(255,255,255,0.55);
  object-fit:contain;
  padding:5px;
  flex:0 0 auto;
}
.system-icon--md{width:54px; height:54px}
.system-icon--lg{width:60px; height:60px}

.list--compact .listrow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding:12px;
  border-bottom:2px solid rgba(155,119,93,0.48);
  gap:12px;
}
.list--compact .listrow:last-child{border-bottom:none}
.grow{flex:1}

.templates-bar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0 12px;
}
.templates-card{
  padding:14px 14px 12px;
}
.templates-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.templates-card__head h2{
  margin:0;
}
.templates-card .templates-bar{
  margin:10px 0 10px;
}
.templates-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 13px;
  border-radius:14px;
  border:2px solid var(--line);
  background:linear-gradient(180deg, #c98057 0%, #b56c47 100%);
  color:#fff8ef;
  font-size:22px;
  line-height:1;
  font-weight:700;
  font-family:"Baloo 2","Nunito",sans-serif;
  text-decoration:none;
}
.chip:hover{text-decoration:none; filter:brightness(1.03)}
.chip--ghost{
  background:rgba(255,255,255,0.45);
  border-color:var(--line-soft);
  color:var(--ink);
}

.empty{
  border:2px dashed var(--line-soft);
  border-radius:16px;
  padding:16px;
  text-align:center;
  margin-top:8px;
  background:rgba(255,255,255,0.35);
}

.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
@media (min-width:860px){
  .grid{grid-template-columns:1fr 1fr}
}

.steps{margin:0; padding-left:23px}
.steps li{margin:8px 0; font-size:20px}

.steps-editor,
.icon-picker{
  border:2px solid var(--line);
  border-radius:16px;
  padding:10px;
  background:rgba(255,255,255,0.34);
}
.step-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}
.step-controls{display:flex; gap:6px}
.iconbtn{
  width:38px;
  height:38px;
  border-radius:10px;
  border:2px solid var(--line);
  background:var(--paper-2);
  color:var(--ink);
  cursor:pointer;
  font-size:25px;
  font-family:"Baloo 2","Nunito",sans-serif;
  line-height:1;
}
.iconbtn:hover{filter:brightness(1.03)}
.hidden{display:none}

.icon-picker__toolbar{display:flex; flex-direction:column; gap:8px}
.icon-picker__tabs{display:flex; flex-wrap:wrap; gap:6px}
.icon-picker__toolbar input[type=\"search\"]{font-size:16px}
.icon-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:2px solid var(--line-soft);
  background:rgba(255,255,255,0.5);
  color:var(--ink-soft);
  border-radius:999px;
  padding:6px 10px;
  font-size:18px;
  font-weight:700;
  cursor:pointer;
}
.icon-tab.is-active{
  color:#fff8ef;
  border-color:var(--accent-strong);
  background:linear-gradient(180deg, #c98057 0%, #b56c47 100%);
}
.icon-picker__selected{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
}
.icon-picker__selected-preview{
  width:36px;
  height:36px;
  border:2px solid var(--line-soft);
  border-radius:10px;
  background:rgba(255,255,255,0.5);
  display:flex;
  align-items:center;
  justify-content:center;
}
.icon-picker__selected-preview img{
  max-width:24px;
  max-height:24px;
  object-fit:contain;
}
.icon-picker__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
.icon-choice{
  width:100%;
  min-height:94px;
  border:2px solid var(--line-soft);
  border-radius:12px;
  background:rgba(255,255,255,0.47);
  color:var(--ink);
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 6px;
}
.icon-choice img{
  width:30px;
  height:30px;
  object-fit:contain;
}
.icon-choice__name{
  width:100%;
  font-size:14px;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.icon-choice.is-selected{
  border-color:var(--accent-strong);
  background:var(--accent-soft);
}
.icon-picker__pager{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.icon-picker__empty{margin:10px 0 0}
.icon-picker__pager .btn[disabled]{cursor:not-allowed}

.row{display:flex; gap:10px}
.row--between{justify-content:space-between}
.row--center{align-items:center}
.member-name{
  font-size:28px;
}
.invite-title{
  display:flex;
  align-items:center;
  gap:8px;
}
.role-pill--member{
  border-color:rgba(182,111,73,0.75);
  background:rgba(201,128,87,0.2);
  color:#7f4b31;
}
.role-pill--observer{
  border-color:rgba(90,141,118,0.75);
  background:rgba(137,180,157,0.2);
  color:#355f4e;
}
.role-pill--owner{
  border-color:rgba(155,119,93,0.78);
  background:rgba(255,255,255,0.5);
  color:var(--ink-soft);
}
.invite-actions{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  min-width:106px;
}
.invite-actions form{
  margin:0;
}
.invite-action-btn{
  width:40px;
  height:40px;
}
.btn.is-copied{
  border-color:rgba(94,148,104,0.62);
  background:var(--success-soft);
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px;
  border-radius:999px;
  border:2px solid var(--line-soft);
  color:var(--ink-soft);
  font-size:14px;
  font-weight:700;
  background:rgba(255,255,255,0.42);
}

.suggestions{display:flex; flex-direction:column; gap:10px}
.suggestion{
  border:2px solid var(--line-soft);
  border-radius:14px;
  padding:10px;
  background:rgba(255,255,255,0.5);
}
.suggestion__meta{font-size:14px; color:var(--ink-soft); margin-bottom:6px}
.suggestion__body{font-size:16px}

.mt{margin-top:12px}
.danger{border-color:rgba(179,92,80,0.62)}

.codebox{
  margin-top:6px;
  padding:10px;
  border-radius:12px;
  background:rgba(255,255,255,0.58);
  border:2px solid var(--line-soft);
  color:var(--ink);
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:13px;
  overflow-x:auto;
  white-space:nowrap;
}
.invite-link-short{
  font-weight:700;
}

.section{margin-top:12px}
.section ul{margin:6px 0 0; padding-left:18px}
.section li{font-size:16px; margin:4px 0}

.auth-card{
  max-width:620px;
  margin-left:auto;
  margin-right:auto;
}
.auth-card__logo-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:6px;
}
.auth-card__logo{
  width:90px;
  height:90px;
  object-fit:contain;
}
.auth-card h1{
  text-align:center;
  margin:0 0 10px;
}
.auth-actions{
  margin-top:8px;
  display:flex;
  justify-content:flex-end;
}
.auth-links{
  margin:10px 0 2px;
  text-align:center;
}
.auth-submit{
  margin-top:16px;
}
.form-submit-spaced{
  margin-top:16px;
}

@media (max-width:900px){
  h1{font-size:36px}
  h2{font-size:25px}
  .pagehead h1{font-size:40px}
  .listitem__title{font-size:30px}
  label{font-size:22px}
  input,textarea,select{font-size:17px}
  .btn{font-size:24px}
  .chip{font-size:20px}
  .steps li{font-size:18px}
}

@media (max-width:680px){
  .topbar{top:8px; margin-top:8px; width:calc(100% - 16px); padding:9px 10px}
  .brand{font-size:26px}
  .brand__logo{width:45px; height:45px}
  .home-switcher select{
    min-width:155px;
    max-width:210px;
    font-size:13px;
  }
  .container{padding:0 8px}
  .card{padding:14px 12px}
  .templates-card{padding:12px 10px}
  .pagehead h1{font-size:34px}
  label{font-size:20px}
  input,textarea,select{font-size:16px}
  .btn{font-size:21px}
  .chip{font-size:18px}
  .listitem__title{font-size:27px}
  .member-name{font-size:24px}
  .invite-title{font-size:23px}
  .invite-actions{
    min-width:100%;
    flex-direction:row;
    justify-content:flex-end;
  }
  .auth-card__logo{width:78px; height:78px}
  .icon-picker__toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }
}
