:root{color-scheme:light;--green:#153b31;--ink:#17382f;--muted:#55665d;--paper:#f8f6ef;--line:#e3e2d8;--white:#fffefa;--red:#9b3843;font-family:system-ui,sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0}header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px max(20px,calc((100vw - 1080px)/2));background:var(--white);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:8px;font-weight:760;white-space:nowrap}.workshop{font-weight:500;color:var(--muted)}.mark{display:grid;place-items:center;background:var(--green);color:#f6d59b;width:37px;height:37px;border-radius:10px;margin-right:3px}.mark svg{width:22px}main{max-width:1120px;margin:auto;padding:30px 20px 0}.hero{position:relative;overflow:hidden;background:#153b31;color:#fffbef;border-radius:20px;display:flex;align-items:center;min-height:300px;padding:34px 44px}.hero-copy{position:relative;z-index:1}.hero-art{position:absolute;right:20px;width:400px;max-width:47%;height:auto}.kicker{font-size:.77rem;font-weight:750;letter-spacing:.13em;color:#f3cb8b;display:flex;align-items:center;gap:10px}.kicker span{width:19px;height:1px;background:currentColor}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:Georgia,serif}h1{font-size:clamp(2.8rem,6vw,4.8rem);letter-spacing:-.055em;line-height:.94;margin:14px 0 17px}h1 em{color:#f2ca8a;font-weight:400}.hero p:last-child{color:#dfebe2}.toolbar,.event,.actions,.panel-head{display:flex;justify-content:space-between;align-items:end;gap:14px}.toolbar{margin:24px 0 15px}.toolbar label{width:min(320px,65%)}.event{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:21px 24px;align-items:center}.event p{margin-top:6px;font-size:.9rem;color:var(--muted)}#badge{border-radius:30px;background:#e8efe6;padding:6px 12px;font-size:.83rem;white-space:nowrap}nav{display:flex;gap:7px;margin-top:20px;border-bottom:1px solid var(--line)}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid transparent;border-radius:8px;padding:9px 13px;font-size:.9rem;font-weight:650;color:var(--ink);background:none}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #a2404a;outline-offset:2px}.light{background:var(--white);border-color:#d6dcd3}.primary{background:var(--green);color:white}.danger{color:var(--red)}nav button{border-radius:0;padding:11px 14px;color:var(--muted);border-bottom:3px solid transparent}nav button[aria-current=true]{border-bottom-color:var(--red);color:var(--ink)}#count{margin-left:4px;background:#e8efe6;padding:2px 7px;border-radius:20px;font-size:.78rem}#panel{min-height:220px;background:var(--white);border:1px solid var(--line);border-radius:14px;margin-top:16px;padding:22px 24px}.panel-head{margin-bottom:16px;align-items:start}.panel-head p,.hint{color:var(--muted);margin-top:5px}.panel-head .actions{flex-wrap:wrap;justify-content:flex-end}.fields{display:flex;gap:12px}.fields>*{flex:1;min-width:0}label{display:grid;gap:5px;font-size:.9rem;font-weight:650}input,textarea,select{width:100%;min-width:0;border:1px solid #cfd8cc;border-radius:8px;padding:9px 11px;color:var(--ink);background:white}textarea{resize:vertical}select{appearance:none;padding-right:30px;background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23173b31' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center}.add{display:flex;align-items:end;gap:10px;margin-bottom:10px}.add label{flex:1}.add button{flex-shrink:0}details{margin:12px 0;color:var(--muted)}summary{cursor:pointer;width:fit-content}details form{margin-top:10px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:10px 0;overflow-wrap:anywhere}.row select{width:min(55%,300px)}.person{display:flex;gap:12px;align-items:center}.avatar{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e8efe6;font-size:.89rem;font-weight:750}.empty{border:1px dashed #d8ddd1;padding:23px;margin-top:16px;border-radius:10px;text-align:center;color:var(--muted)}ol{padding-left:25px}li{padding:4px 0;overflow-wrap:anywhere}.round{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}#feedback{margin-top:14px;min-height:25px;color:#87323b}footer{display:flex;justify-content:space-between;gap:8px;border-top:1px solid var(--line);margin-top:9px;padding:14px 0;color:var(--muted);font-size:.85rem}dialog{border:1px solid var(--line);border-radius:16px;color:var(--ink);background:var(--white);width:min(440px,calc(100% - 28px));padding:23px}dialog::backdrop{background:#0c281fc2}dialog form{display:grid;gap:15px}dialog .actions{justify-content:flex-end}.order-name{font-weight:650}.match-value{color:var(--red);font-weight:750}@media(max-width:620px){header{padding:11px 14px}.workshop{display:none}main{padding:17px 14px 0}.hero{padding:26px 20px;min-height:238px}.hero-art{right:-28px;max-width:58%;top:10px;opacity:.5}.hero p:last-child{max-width:240px}.hero-copy{max-width:100%}.event,#panel{padding:16px}.panel-head{flex-wrap:wrap}.panel-head .actions{justify-content:start}footer{flex-wrap:wrap}nav button{padding:10px 7px}}
[hidden]{display:none!important}#account{margin-top:20px;display:block}#account a{color:var(--ink);font-weight:650}#account article+article{margin-top:17px;padding-top:17px;border-top:1px solid var(--line)}nav{flex-wrap:wrap}.rule-form{margin-bottom:16px}.rule-form .actions{justify-content:flex-start;margin-top:10px}@media(max-width:620px){.rule-form .fields{flex-wrap:wrap}.rule-form .fields label{min-width:135px}.row>div:last-child button{padding:7px}}
.header-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.account-form{display:grid;gap:12px;margin-top:12px;max-width:440px}.account-form .actions{justify-content:flex-start;flex-wrap:wrap}.account-form [role=status],#invite-status{color:var(--red);font-size:.93rem}.account-form [role=status]:empty,#invite-status:empty{display:none}.wish-card{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:22px 24px;margin-top:16px}.wish-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:20px}.wish-grid>div+div{border-left:1px solid var(--line);padding-left:24px}.wishes{list-style:none;padding:0}.wishes li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}.wishes small{display:block;color:var(--muted);margin-top:4px}.wishes a{color:var(--green);font-weight:650}.wishes a:hover{text-decoration-thickness:2px}#invite-dialog label,#invite-dialog .actions,#invite-status{margin-top:12px}#invite-dialog .actions{justify-content:flex-end}#import-label{margin:12px 0;max-width:440px}@media(max-width:620px){.wish-grid{grid-template-columns:1fr;gap:16px}.wish-grid>div+div{border-left:0;border-top:1px solid var(--line);padding:16px 0 0}.wish-card{padding:16px}.wishes li{align-items:start}}
.participant-email{display:block;color:var(--muted);margin:4px 0 0 46px}.row>div:last-child{text-align:right}

/* Keep form controls readable on iPhone and allow manual browser zoom. */
input, textarea, select { font-size: max(16px, 1rem); max-width: 100%; }
input[type="date"] { min-inline-size: 0; display: block; }
label, .add label, .participant-info, .wish-grid > div { min-width: 0; }
#event-form .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#event-form .actions { flex-wrap: wrap; }
#dialog-title:focus { outline: none; }
nav { flex-wrap: nowrap; overflow-x: auto; }
nav button { flex: 0 0 auto; white-space: nowrap; }
.participant-actions { display: flex; flex: none; gap: 4px; }
.participant-actions button { white-space: nowrap; min-height: 44px; }
.gift-order { border-top: 1px solid var(--line); padding-top: 14px; }
.gift-order > button { margin-top: 8px; }
.wishes { overflow-wrap: anywhere; }
@media (max-width: 620px) {
  #event-form .fields, .rule-form .fields { display: grid; grid-template-columns: minmax(0, 1fr); }
  .rule-form .fields label { min-width: 0; }
  .participant-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .participant-actions { flex-wrap: wrap; }
  .participant-email { overflow-wrap: anywhere; }
}

/* Workshop date field spacing */
#event-form,
#event-form label {
  grid-template-columns: minmax(0, 1fr);
}

#event-form input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Workshop exchange dialog and card actions */
#event-form input:not([type="hidden"]) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: max(44px, 2.75rem);
  line-height: normal;
}

#event-form input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}

#event-form input[type="date"]::-webkit-date-and-time-value {
  min-height: 1.2em;
  text-align: start;
}

.exchange-action-footer {
  border-top: 1px solid var(--line);
  padding-top: 6px;
  display: flex;
  justify-content: flex-start;
}

.wish-card-footer {
  margin-top: 18px;
  justify-content: flex-end;
}

.exchange-text-action {
  min-height: 44px;
  padding-inline: 8px;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.exchange-text-action:hover {
  background: var(--paper);
}

/* Workshop Saved People */
.saved-people-list { margin-bottom: 12px; }
.saved-person {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.saved-person label { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.saved-person input[type="checkbox"] { width: 1.2rem; height: 1.2rem; flex: none; padding: 0; }
.saved-person button { flex: none; min-height: 44px; }
.saved-person small { display: block; color: var(--muted); }
.participant-actions { flex-wrap: wrap; }

/* Workshop invite button spacing */
.wish-card-footer button[data-response="accepted"] {
  margin-inline-start: 12px;
}

/* Workshop iOS Home Screen spacing and refresh */
.ios-home-screen body > header {
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
}

.ios-home-screen main {
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
}

.ios-home-screen footer {
  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
}

.ios-home-screen #refresh-app {
  display: inline-grid;
  place-items: center;
  padding: 0;
  width: 44px;
  height: 44px;
  flex: none;
  margin-left: auto;
}

@media (max-width: 480px) {
  .ios-home-screen body > header {
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 8px;
  }

  .ios-home-screen .header-actions:not(:has(button:not([hidden]))) {
    display: none;
  }
}

/* Workshop single-row iOS header */
.ios-home-screen body > header {
  flex-wrap: nowrap;
}

.ios-home-screen .header-actions {
  flex: none;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.ios-home-screen .header-actions button {
  white-space: nowrap;
  min-height: 44px;
}

.ios-home-screen #refresh-app {
  margin-left: 0;
}

@media (max-width: 480px) {
  .ios-home-screen body > header { gap: 6px; }
  .ios-home-screen .header-actions button {
    padding-inline: 7px;
    font-size: .875rem;
  }
  .ios-home-screen #refresh-app { padding: 0; }
  .ios-home-screen .brand { gap: 5px; font-size: .9rem; }
  .ios-home-screen .brand .mark { width: 32px; height: 32px; margin-right: 0; }
  .ios-home-screen .new-exchange-plus { display: none; }
}

@media (max-width: 360px) {
  .ios-home-screen .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Workshop iOS status bar clearance */
.ios-home-screen body > header {
  padding-top: calc(28px + env(safe-area-inset-top, 0px));
}
