/* The activity journal shares the pastel paper palette with the game home. */
#activity-results{
  --activity-ink:var(--game-ink,#624537);
  --activity-line:var(--game-line,#a57860);
  --activity-paper:var(--game-paper,#fff6e7);
  color:var(--activity-ink);padding-top:2px;
}
#activity-results .period-tabs{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;
  padding:0 2px;background:none;border-radius:0;margin:0 0 28px;
}
#activity-results .period-tabs a{
  position:relative;min-width:0;min-height:43px;padding:10px 2px 9px;
  border:2px solid var(--activity-line);border-radius:13px 13px 9px 9px;
  background:var(--game-mint,#a9ddc7);color:var(--activity-ink);
  box-shadow:0 4px 0 #c9ac91;font-weight:800;font-size:14px;letter-spacing:.02em;
  transition:transform .15s,box-shadow .15s;
}
#activity-results .period-tabs a:nth-child(2){background:var(--game-pink,#ffd2d9)}
#activity-results .period-tabs a:nth-child(3){background:var(--game-gold,#ffd572)}
#activity-results .period-tabs a:nth-child(4){background:var(--game-lilac,#cabcf0)}
#activity-results .period-tabs a[aria-current=page]{transform:translateY(-3px);border-color:var(--activity-ink);box-shadow:0 6px 0 #b58b70}
#activity-results .period-tabs a[aria-current=page]::after{content:'';position:absolute;left:50%;bottom:-12px;width:7px;height:7px;background:var(--activity-ink);border-radius:50%;transform:translateX(-50%)}
.activity-calendar{
  position:relative;background:var(--activity-paper);border:2px solid var(--activity-line);
  border-radius:17px 17px 9px 9px;padding:27px 18px 18px;margin:0 2px 18px;
  box-shadow:0 5px 0 #e3cbb2,0 7px 0 var(--activity-line);
  background-image:repeating-linear-gradient(0deg,transparent,transparent 27px,#decbb32b 28px);
}
.activity-calendar::before{content:'';position:absolute;left:calc(50% - 36px);top:-10px;width:72px;height:20px;transform:rotate(-3deg);background:#cabcf0b3;border-left:2px dashed #ab92c7;border-right:2px dashed #ab92c7}
.activity-calendar::after{content:'';position:absolute;left:14px;right:14px;bottom:4px;border-bottom:2px dashed #c9a989;pointer-events:none}
.activity-calendar-head{display:flex;gap:12px;justify-content:space-between;align-items:center}
.activity-calendar-title{min-width:0;flex:1}
.activity-calendar-head .eyebrow{display:inline-block;background:#f6e7cd;border-radius:6px;padding:3px 7px;margin:0 0 8px;color:#8d6650;font-size:11px;letter-spacing:.08em;font-weight:800}
.activity-calendar-head h2{font-size:clamp(19px,5.6vw,25px);line-height:1.45;letter-spacing:.02em;color:var(--activity-ink);margin:0;overflow-wrap:anywhere;font-weight:900}
.activity-calendar-head p:not(.eyebrow){font-size:11px;line-height:1.8;color:#8a6b55;margin:6px 0 0}
.activity-total{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  width:61px;min-height:69px;border:2px solid var(--activity-line);border-radius:13px;
  background:var(--game-gold,#ffd572);color:var(--activity-ink);flex-shrink:0;
  box-shadow:3px 3px 0 #d4af7c;transform:rotate(5deg);
}
.activity-total strong{font-size:28px;font-weight:900;line-height:1.1}
.activity-total>span{font-size:10px;margin-top:4px;font-weight:800}
.activity-date-controls{display:flex;align-items:center;gap:8px;padding-top:14px;margin-top:17px;border-top:2px dashed #d7bda4}
.activity-date-controls label{font-size:11px;font-weight:800;color:#80604a;white-space:nowrap}
.activity-date-controls input{min-width:0;width:145px;flex:1;max-width:185px;border:2px solid #c5a184;border-radius:10px;padding:8px 7px;background:#fffdf6;color:var(--activity-ink);font:inherit;font-size:16px;min-height:42px;box-shadow:inset 0 2px 0 #ebdfcf;color-scheme:light}
.activity-today{min-height:42px;border:2px solid var(--activity-line);border-radius:10px;background:var(--game-mint,#a9ddc7);color:var(--activity-ink);font:inherit;font-size:11px;font-weight:800;padding:8px;white-space:nowrap;box-shadow:0 3px 0 #c9af91;cursor:pointer}
.activity-date-hint{font-size:11px;color:#8a6b55;margin:12px 0 1px;line-height:1.7}
.activity-source-line{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#8d705a;margin:21px 3px 14px;line-height:1.5}
.activity-source-line>span:first-child{display:flex;gap:5px;align-items:center}
#activity-results .activity-search{min-height:49px;border:2px solid var(--activity-line);border-radius:14px;background:#fffdf7;padding:0 13px;gap:9px;box-shadow:0 3px 0 #e5cdb2}
#activity-results .activity-search>svg{color:#a57a5d;flex-shrink:0}
#activity-results .activity-search input{padding:12px 0;font-size:16px;color:var(--activity-ink)}
#activity-results .activity-search input::placeholder{color:#a28a73}
#activity-results .activity-search:focus-within{border-color:var(--activity-ink);box-shadow:0 0 0 3px #ffd57280,0 3px 0 #d7b999}
#activity-results .activity-clear{color:var(--activity-ink);background:#f9e8d3;border-radius:50%;width:28px;height:28px}
.activity-search-count{font-size:11px;line-height:1.8;color:#8c705c;margin:14px 3px 17px}
#activity-results .events{gap:20px}
#activity-results .event-filled{background:#fffdf5;border:2px solid var(--activity-line);border-radius:19px;box-shadow:0 5px 0 #d9baa0;overflow:hidden;position:relative}
#activity-results .event-filled>summary{padding:16px 17px 0;cursor:pointer;list-style:none}
#activity-results .event-filled>summary::-webkit-details-marker{display:none}
.event-filled .card-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px;margin-bottom:17px}
.event-filled .category{color:#80604b;background:#f6e6cd;border:1.5px solid #cfb093;border-radius:6px;padding:4px 8px;font-size:10px;font-weight:800;letter-spacing:.02em}
.event-filled .status{display:inline-flex;gap:5px;align-items:center;max-width:100%;padding:4px 8px;border:1.5px solid #bb9a7e;border-radius:999px;font-size:10px;font-weight:800;line-height:1.5;color:#72543f;white-space:normal}
.event-filled .status::before{content:'';width:5px;height:5px;flex-shrink:0;border-radius:50%;background:currentColor}
.event-filled .status.ongoing{color:#426c58;background:#c9ecd6;border-color:#89b49b}
.event-filled .status.future{color:#765282;background:#e5d9f6;border-color:#b89ccf}
.event-filled .status.ended{color:#8b7868;background:#eee3d7;border-color:#c8b49f}
.event-filled .status.uncertain{color:#8a6538;background:#ffedb4;border-color:#d3b072}
.event-headline{display:flex;align-items:center;gap:12px;margin-bottom:17px}
.event-headline h2{font-size:17px;line-height:1.55;letter-spacing:.01em;overflow-wrap:anywhere;margin:0;color:var(--activity-ink);font-weight:900;flex:1;min-width:0}
.event-date-badge{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:49px;min-width:49px;align-self:flex-start;min-height:63px;background:#fff9e9;border:2px solid var(--activity-line);border-radius:9px;color:var(--activity-ink);box-shadow:2px 3px 0 #d9bfa3;transform:rotate(-4deg);overflow:hidden}
.event-date-badge .event-date-month{width:100%;background:var(--game-pink,#ffd2d9);text-align:center;border-bottom:1.5px solid #c49b87;font-size:10px;line-height:1.4;padding:3px 0;font-weight:800}
.event-date-badge strong{font-size:24px;line-height:1.25;letter-spacing:-.5px;padding:3px 0 4px;font-weight:900}
.event-expand-button{display:flex;align-items:center;justify-content:center;width:27px;height:27px;flex-shrink:0;background:#f7ebd5;border:1.5px solid #d6b599;border-radius:50%;color:#99704f}
.event-filled .expand-icon{width:15px;height:15px;transition:transform .2s}
#activity-results .event-filled[open] .expand-icon{transform:rotate(180deg);color:var(--activity-ink)}
.event-schedule{display:grid;gap:7px;font-size:12px;line-height:1.8;color:#89664d;background:#fcf1df;border-radius:10px;padding:10px 11px}
.event-schedule>div{display:flex;gap:8px;align-items:flex-start}
.event-schedule svg{margin-top:3px;color:#ac8666;flex-shrink:0}
.event-schedule span{white-space:pre-line;overflow-wrap:anywhere;min-width:0}
.event-schedule small{font-size:10px;color:#a78b72;margin-left:7px;white-space:nowrap}
.event-read-hint{margin-top:12px;padding:10px 1px 11px;display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:11px;color:#927358;font-weight:700}
.event-read-label{font-size:11px}
.event-read-plus{display:inline-flex;align-items:center;justify-content:center;font-size:16px;color:#987052;border:1.5px solid #cba487;border-radius:50%;width:22px;height:22px;background:#ffedba;transition:transform .2s}
.event-filled[open] .event-read-plus{transform:rotate(45deg)}
#activity-results .event-filled .card-detail{padding:20px 18px 22px;border-top:2px dashed #d4b99e;color:var(--activity-ink);background:#fffaf0;overflow-wrap:anywhere}
.event-filled .detail-heading{display:inline-block;background:var(--game-mint,#a9ddc7);color:#496d57;border-radius:6px;padding:5px 9px;font-size:12px;font-weight:900;letter-spacing:.04em;margin:0 0 14px}
.event-description{color:#745741}
.event-description h3{font-size:14px;color:var(--activity-ink);margin:21px 0 10px;line-height:1.7;font-weight:900}
.event-description h3:first-child{margin-top:0}
.event-description p{font-size:13px;line-height:1.95;white-space:pre-line;margin:0}
.event-description p+p{margin-top:14px}
.event-description ul{padding-left:19px;margin:12px 0;font-size:13px;line-height:1.95}
.event-description li+li{margin-top:7px}
.event-description li::marker{color:#c39a72}
.event-data-note{border:1.5px solid #d8b786;padding:13px 12px;background:#fff0c5;border-radius:11px;margin-top:20px;font-size:11px;line-height:1.85;color:#896744}
.event-data-note strong{display:block;margin-bottom:7px;font-size:12px}
.event-data-note p+p{margin-top:7px}
.event-original-time{font-size:11px;color:#947355;margin-top:17px;line-height:1.9}
.event-original-time summary{cursor:pointer;min-height:28px;line-height:28px}
.event-original-time p{margin-top:8px;white-space:pre-line}
.activity-source-details{font-size:11px;color:#94765e;line-height:1.9;margin:27px 3px 0;padding:13px 0 0;border-top:2px dashed #d8bfa4}
.activity-source-details summary{cursor:pointer;font-weight:700;min-height:30px;line-height:30px}
.activity-source-details p{margin-top:9px}
#activity-results .empty-state{background:var(--activity-paper);border:2px dashed #c6a285;border-radius:18px;padding:34px 18px;color:var(--activity-ink)}
.activity-empty-sticker{display:flex;align-items:center;justify-content:center;width:72px;height:76px;border:2px solid var(--activity-line);border-radius:14px;background:var(--game-lilac,#cabcf0);box-shadow:3px 4px 0 #d4b99b;transform:rotate(-7deg);margin:0 auto 24px}
#activity-results .activity-empty-sticker svg{margin:0;color:var(--activity-ink)}
#activity-results .empty-state h2{font-size:18px;color:var(--activity-ink);font-weight:900;margin-bottom:11px}
#activity-results .empty-state p{font-size:12px;color:#997b61;line-height:1.9}
.activity-source-month{background:var(--game-gold,#ffd572);color:var(--activity-ink);border:2px solid var(--activity-line);border-radius:11px;padding:11px 13px;font:inherit;font-size:12px;font-weight:800;box-shadow:0 3px 0 #c7a080;margin-top:20px;min-height:44px;cursor:pointer}
#activity-results :is(a,button,input,summary):focus-visible{outline:3px solid #9674bb;outline-offset:4px}
#activity-results .activity-search input:focus-visible{outline:0}
@media(hover:hover){
  #activity-results .period-tabs a:hover{transform:translateY(-3px)}
  .activity-today:hover,.activity-source-month:hover{filter:brightness(1.03)}
  #activity-results .event-filled>summary:hover{background:#fff7e7}
}
@media(max-width:350px){
  #activity-results .period-tabs{gap:6px;margin-bottom:26px}
  #activity-results .period-tabs a{font-size:13px}
  .activity-calendar{padding:24px 12px 16px}
  .activity-calendar-head{gap:8px}
  .activity-calendar-head h2{font-size:19px}
  .activity-total{width:53px;min-height:65px}
  .activity-total strong{font-size:26px}
  .activity-date-controls{flex-wrap:wrap;gap:8px}
  .activity-date-controls label{width:100%;font-size:11px}
  .activity-date-controls input{width:130px;font-size:16px;max-width:none}
  .activity-today{font-size:11px}
  .activity-source-line{font-size:10px;gap:7px}
  #activity-results .activity-search{padding:0 10px;gap:7px}
  #activity-results .activity-search input{font-size:16px}
  #activity-results .event-filled>summary{padding:14px 12px 0}
  .event-headline{gap:9px}
  .event-headline h2{font-size:16px}
  .event-date-badge{width:44px;min-width:44px;min-height:60px}
  .event-date-badge strong{font-size:22px}
  .event-expand-button{width:23px;height:23px}
  .event-schedule{padding:9px;font-size:11px}
  #activity-results .event-filled .card-detail{padding:18px 13px 20px}
}
@media(prefers-reduced-motion:reduce){
  #activity-results .period-tabs a,.event-filled .expand-icon,.event-read-plus{transition:none}
}
