/* Journal 1 visual direction v31 — vibrant Egyptian folk-art editorial, not UI cards. */
:root{--j31-navy:#342257;--j31-pink:#ed438c;--j31-melon:#fb7660;--j31-teal:#059eaa;--j31-lime:#b5d449;--j31-sun:#ffc339}
.paper.j31-polished{background:linear-gradient(120deg,#fffaf1 0%,#fffefa 51%,#fff5e8 100%);isolation:isolate;}
.paper.j31-polished::before{height:13px;background:repeating-linear-gradient(90deg,#ef4689 0 46px,#ffcd36 46px 92px,#05a9a7 92px 138px,#a05fba 138px 184px,#ff8d4c 184px 230px)}
.paper.j31-polished .reader-body{position:relative;z-index:1}
.paper.j31-polished .reader-body>h1{color:#38205b;font-weight:850;line-height:1.35;text-shadow:2px 3px 0 #ffd65f66;letter-spacing:-.02em}
.paper.j31-polished .chapter{background:#ffe569;color:#3f255f;box-shadow:4px 4px 0 #ef72a5}
.paper.j31-polished .field textarea{box-sizing:border-box;font-family:inherit;font-size:1em;}
/* Paper writing spaces with alternating editorial motifs, no repeated dull grey rectangles. */
.j31-writing-field{position:relative;min-height:110px;background:linear-gradient(140deg,#fffefa 35%,#fffbf2 100%);border:2px solid #e8b7cb;border-radius:5px 25px 9px 27px;padding:15px 16px 11px;margin:17px 0 25px;box-shadow:6px 8px 0 #efbad034;transform:none}
.j31-writing-field::before{content:'';position:absolute;inset:9px auto 9px 9px;width:5px;border-radius:4px;background:repeating-linear-gradient(180deg,#eb5c99 0 13px,transparent 13px 19px,#ffc23a 19px 28px,transparent 28px 39px)}
.j31-writing-field textarea{margin:0!important;min-height:94px;background:repeating-linear-gradient(180deg,transparent 0 35px,#b5d9e9 36px 37px)!important;border:0!important;outline-offset:2px;border-radius:4px!important;box-shadow:none!important;line-height:37px!important;padding:3px 12px 9px 10px!important;position:relative;z-index:1}
.j31-writing-field .j31-corner-art{position:absolute;top:-18px;left:13px;font-size:33px;line-height:1;z-index:2;color:#d93e83;text-shadow:1px 2px 0 #fff4b8;transform:rotate(-12deg)}
.j31-writing-field:nth-of-type(5n+2){border-color:#7bbec5;background:linear-gradient(120deg,#f4ffff,#fffdf9)}
.j31-writing-field:nth-of-type(5n+2)::before{background:repeating-linear-gradient(180deg,#18aca9 0 15px,transparent 15px 22px,#f5ba40 22px 31px,transparent 31px 40px)}
.j31-writing-field:nth-of-type(5n+3){border-color:#d4b4e4;background:#fff9ff}
.j31-writing-field:nth-of-type(5n+4){border-color:#f2c376;background:#fffbed}
.j31-writing-field:focus-within{border-color:#a54c9c;box-shadow:0 0 0 4px #f8cbdf,6px 8px 0 #e5b5cd5e}
.j31-creative-questions .reader-body>.choices,.j31-creative-questions .reader-body>.two{border:0;background:transparent}
.j31-reference-scrap{background:linear-gradient(135deg,#fff1bf,#ffe4dc)!important;border:3px dashed #e88d7b!important;border-radius:9px 35px 17px 35px!important;box-shadow:8px 8px 0 #f2b76e33!important;position:relative}
.j31-reference-scrap::before{content:'✦';position:absolute;left:15px;top:-18px;background:#19a8a7;color:white;padding:2px 13px;border-radius:50%;transform:rotate(-12deg)}
/* PAGE 6 — narrative scrapbook, not a column of gray paragraphs. */
.paper[data-section='page4'] .j31-scrapbook{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;align-items:start;margin:28px 0 35px}
.j31-memory-panel{position:relative;padding:22px 23px;border:3px solid #f1be72;border-radius:4px 42px 16px 35px;background:linear-gradient(135deg,#fff6d9,#fffef8);box-shadow:8px 9px 0 #edbb7f40;overflow:visible}
.j31-memory-panel:before{content:'';position:absolute;top:-12px;right:35%;width:75px;height:22px;transform:rotate(-7deg);background:#19a8aa77;clip-path:polygon(0 0,95% 0,100% 100%,4% 90%)}
.j31-memory-panel:nth-child(2){border-color:#f1b1d1;background:#fff1f6;transform:rotate(-.7deg)}
.j31-memory-panel:nth-child(3){border-color:#81cad2;background:#effffd;transform:rotate(.65deg)}
.j31-memory-panel:nth-child(4){border-color:#d9bbeb;background:#fcf3ff;transform:rotate(-.4deg)}
.j31-memory-panel:nth-child(5){border-color:#eeab76;background:#fff5e7;transform:rotate(.5deg)}
.j31-memory-panel:first-child,.j31-memory-panel:last-child{grid-column:1/-1}
.j31-memory-title{display:flex;gap:12px;align-items:center;color:#592c65;margin-bottom:15px;border-bottom:2px dashed #be9db0;padding-bottom:9px;font-size:1.12em}
.j31-memory-title span{background:#fff3a5;color:#be4772;border-radius:40px;padding:2px 10px;white-space:nowrap}
.j31-memory-panel p{margin:12px 0;line-height:1.9;font-size:.98em}
/* PAGE 7 — the rules are a festive illustrated gameboard. */
.j31-rule-illustrated{position:relative;padding:20px 10px 24px;margin:25px 0 33px;border:0;background:linear-gradient(150deg,#fff9ed,#ffecfa 50%,#e9fcf7);border-radius:38px}
.j31-rule-header{text-align:center;margin:8px 0 25px;padding:12px 15px}
.j31-rule-header h2{color:#552268;font-size:clamp(26px,4vw,39px);margin:3px 0}
.j31-rule-header p{margin:0;font-size:.9em}.j31-rule-smile{font-size:35px;letter-spacing:18px;color:#ed4a8d}
.j31-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:0 9px}
.j31-rule-tile{position:relative;min-height:164px;padding:30px 21px 18px 26px;border:3px solid #e7a439;border-radius:14px 46px 14px 42px;background:linear-gradient(135deg,#fff0a7,#ffe6c1);box-shadow:7px 8px 0 #e9b36655;overflow:visible}
.j31-rule-tile:nth-child(2){background:linear-gradient(150deg,#abf0e2,#d4fbf2);border-color:#19a79e;transform:rotate(1deg)}
.j31-rule-tile:nth-child(3){background:linear-gradient(150deg,#ffcce0,#ffecf6);border-color:#e45a93;transform:rotate(-1deg)}
.j31-rule-tile:nth-child(4){background:linear-gradient(150deg,#e7d3fa,#f9f0ff);border-color:#9063c1}
.j31-rule-tile:nth-child(5){background:linear-gradient(150deg,#fddb83,#ffeac4);border-color:#ec8d44;transform:rotate(.8deg)}
.j31-rule-tile:nth-child(6){background:linear-gradient(150deg,#c1dafa,#e3eeff);border-color:#5588dd;transform:rotate(-.7deg)}
.j31-rule-tile:nth-child(7){background:linear-gradient(150deg,#ffcee3,#fff1bd);border-color:#d46c9e}
.j31-rule-tile:nth-child(8){background:linear-gradient(150deg,#b7ebd0,#fff0bc);border-color:#3aa984;transform:rotate(.7deg)}
.j31-rule-picto{position:absolute;top:-23px;left:15px;background:#fff;border:3px solid currentColor;color:#ca448b;width:58px;height:58px;display:grid;place-items:center;border-radius:50%;font-size:40px;box-shadow:2px 3px #fff8e9}
.j31-rule-index{display:inline-grid;place-items:center;width:38px;height:38px;background:#512b68;color:#fff;font-size:18px;font-weight:bold;border-radius:50%;margin-bottom:12px}
.j31-rule-tile p{margin:0!important;font-size:clamp(16px,1.7vw,20px);font-weight:600;line-height:1.75;color:#3d2854;overflow-wrap:normal}
.j31-legend-head{padding:10px 15px;color:#512969;border-right:7px solid #efa94a}
.j31-legend{gap:13px}.j31-legend .legend-tile{border:3px solid #e6c0a8;background:linear-gradient(140deg,#fff4d6,#fffaf2);box-shadow:5px 5px 0 #efd69a77;border-radius:7px 29px 9px 29px;transform:rotate(-.7deg)}
.j31-legend .legend-tile:nth-child(3n+2){background:linear-gradient(145deg,#daf5f1,#f4fffb);border-color:#8acec5;transform:rotate(.7deg)}
.j31-legend .legend-tile:nth-child(3n){background:linear-gradient(145deg,#ffe3f0,#fff9fc);border-color:#e5a3c0}
/* PAGE 9 — selectable Otto CDs. A disc, not the same soft button again. */
.paper[data-section='otto'] .j31-cd-choice{display:flex;flex-direction:column;align-items:center;gap:12px;min-width:144px;padding:18px 12px 23px!important;border:3px solid #8753a7!important;border-radius:24px 10px 32px 12px!important;background:linear-gradient(135deg,#fff2c9,#ffe5ec)!important;box-shadow:6px 6px 0 #e2a5ce77;color:#442657;font-weight:750;transition:transform .16s ease,box-shadow .16s ease}
.paper[data-section='otto'] .j31-cd-choice:nth-child(2n){background:linear-gradient(145deg,#d0f4f0,#ecffff)!important;border-color:#159da3!important}
.paper[data-section='otto'] .j31-cd-choice:nth-child(3n){background:linear-gradient(145deg,#efe0fc,#fff0fc)!important;border-color:#be619b!important}
.paper[data-section='otto'] .j31-cd-choice:hover{transform:translateY(-3px) rotate(-1deg)}
.paper[data-section='otto'] .j31-cd-choice[aria-pressed=true]{box-shadow:0 0 0 3px #51336b,6px 7px 0 #ffc339!important}
.j31-cd-art{display:grid;place-items:center;position:relative;width:84px;height:84px;border-radius:50%;border:3px solid #fff;background:conic-gradient(#eaf3ff,#aaccf1 18%,#fbcbd9 29%,#f8f8fb 40%,#98dddb 58%,#f1c5f5 76%,#fff4a6 95%,#eaf3ff);box-shadow:1px 3px 10px #5c3a6655}
.j31-cd-art::before{content:'';position:absolute;inset:24%;border:4px solid #c2d4e6;border-radius:50%;background:linear-gradient(135deg,#ed4896,#ffa94e)}
.j31-cd-art i{z-index:1;width:12px;height:12px;background:#fff;border:2px solid #665d9b;border-radius:50%}
/* PAGE 10 — sticker/cipher gallery: each personal symbol is an illustrated artwork. */
.paper[data-section='page7'] .j31-cipher-deck{margin:30px 0 38px;padding:22px;background:linear-gradient(130deg,#41275f,#705194 44%,#38245a);border:7px double #ffc452;border-radius:29px;box-shadow:0 15px 0 #ebbb5544,0 20px 40px #48205729}
.j31-deck-heading{text-align:center;color:#fff9dc;padding-bottom:14px}.j31-deck-heading span{font-weight:850;font-size:clamp(23px,3vw,33px);letter-spacing:.03em;color:#ffdb6b}.j31-deck-heading p{color:#f8eafa;font-size:.93em;margin:10px 0}
.j31-cipher-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.j31-symbol-card{display:flex;flex-direction:column;align-items:stretch;position:relative;min-width:0;padding:23px 16px 18px!important;background:var(--sym-soft)!important;border:4px solid var(--sym-accent);border-radius:12px 36px 12px 36px;box-shadow:inset 0 0 0 5px #fff8,5px 6px 0 #1d133648;overflow:visible}
.j31-symbol-card:before{content:'✦';position:absolute;top:-16px;right:18px;background:#ffc943;color:#553063;border:3px solid #fff7d2;width:38px;height:38px;display:grid;place-items:center;border-radius:50%;font-size:24px}
.j31-symbol-card .j31-glyph{display:block;margin:auto;width:min(180px,85%);height:auto;filter:drop-shadow(2px 5px 0 #4027551d)}
.j31-symbol-card>div{width:100%;font-size:.95em}.j31-symbol-card b{font-size:1.3em;color:#412558;display:block;margin:6px 0 5px}
.j31-symbol-number{display:block;font-size:13px;font-weight:700;color:#88476d;letter-spacing:.08em}
.j31-symbol-card small{display:block;font-size:.92em;color:#745370;line-height:1.5}
.j31-symbol-card .field{margin:15px 0 0!important;min-height:0;background:#fffded!important;border:2px dashed #bd7f9f;border-radius:14px;padding:10px 10px 4px;box-shadow:0 3px 0 #f3c3c2aa}
.j31-symbol-card .field textarea{min-height:56px!important;background:transparent!important;border:0!important;line-height:1.6!important;padding:4px!important}
.paper[data-section='page7'] .j31-custom-heading{margin-top:35px;color:#db4784;font-size:clamp(25px,3vw,36px)}
.paper[data-section='page7'] .j31-custom-strap{padding:12px 18px;background:#fff1c1;border-right:6px solid #df6ba5;border-radius:13px}
/* PAGE 11 — weather as distinct scenic collectible postcards. */
.paper[data-section='page8'] .weather-grid{gap:16px}
.paper[data-section='page8'] .j31-weather-scene{border:4px solid #eeae52!important;border-radius:14px 38px 13px 38px!important;background:linear-gradient(160deg,#fff2b4 5%,#ffc56b 90%)!important;min-height:250px;box-shadow:6px 7px 0 #f0b16777!important;transition:transform .16s ease}
.paper[data-section='page8'] .j31-weather-scene:nth-child(2){background:linear-gradient(155deg,#8ae2e0,#d7f8ea)!important;border-color:#15a4a6!important}
.paper[data-section='page8'] .j31-weather-scene:nth-child(3){background:linear-gradient(155deg,#c5ccf5,#e9e0ff)!important;border-color:#7459a4!important}
.paper[data-section='page8'] .j31-weather-scene:nth-child(4){background:linear-gradient(155deg,#a3d1f3,#d9edf9)!important;border-color:#4782c9!important}
.paper[data-section='page8'] .j31-weather-scene:nth-child(5){background:linear-gradient(155deg,#6e5c9c,#b29fe4)!important;border-color:#443177!important;color:#fff8e6}
.paper[data-section='page8'] .j31-weather-scene:nth-child(6){background:linear-gradient(155deg,#ffceeb,#ffd68b)!important;border-color:#e85a94!important}
.paper[data-section='page8'] .j31-weather-scene:hover{transform:translateY(-3px) rotate(-.5deg)}
.paper[data-section='page8'] .j31-weather-scene[aria-pressed=true]{outline:4px solid #4a2e68!important;outline-offset:3px}
.paper[data-section='page8'] .j31-weather-scene b{font-size:1.16em}
.paper[data-section='page8'] .j31-weather-scene small{opacity:.83}
/* Save controls remain intact, more legible; body needs ample writing space. */
.nav{border-top:4px solid #efad50!important;background:#fffcf3!important;box-shadow:0 -5px 20px #43204d17!important}
.nav button:not(.quiet){background:linear-gradient(135deg,#087f84,#16a6a8)!important;color:#fff!important;border:2px solid #fff5cf!important;box-shadow:3px 4px 0 #e1b96b!important}
.nav button.quiet{background:#f7dfea!important;color:#532b68!important;border:2px solid #ead2e0!important}
@media(max-width:800px){.j31-rule-grid,.j31-cipher-grid,.paper[data-section='page4'] .j31-scrapbook{grid-template-columns:1fr}.j31-memory-panel:first-child,.j31-memory-panel:last-child{grid-column:auto}.j31-rule-tile{min-height:120px}.paper[data-section='page8'] .weather-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.paper[data-section='page8'] .j31-weather-scene{min-height:195px}}
@media(max-width:460px){.paper[data-section='page8'] .weather-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.paper[data-section='page8'] .j31-weather-scene{padding:8px!important;min-height:165px}.paper[data-section='page8'] .weather-art{height:110px}.j31-cipher-deck{padding:10px!important}.j31-symbol-card{padding:18px 9px!important}.j31-symbol-card .j31-glyph{width:124px}.j31-rule-tile{padding:32px 16px 15px}}
@media(prefers-reduced-motion:reduce){.j31-cd-choice,.j31-weather-scene{transition:none!important}}
/* Across every chapter: varied, illustrated-feeling answer chips instead of flat pastel blocks. */
.paper.j31-polished .choices:not(.weather-grid)>.choice:not(.j31-cd-choice){border:3px solid #e27b9f;background:linear-gradient(145deg,#ffe1ee,#fff8d3);color:#482a61;box-shadow:4px 5px 0 #edb8c277;border-radius:12px 26px 10px 27px;min-height:72px;padding:12px 19px;font-weight:680;transition:transform .15s ease}
.paper.j31-polished .choices:not(.weather-grid)>.choice:not(.j31-cd-choice):nth-child(4n+2){border-color:#17a6ad;background:linear-gradient(145deg,#d7fcf5,#fbffdb);border-radius:26px 12px 26px 10px;box-shadow:4px 5px 0 #a2d9d177}
.paper.j31-polished .choices:not(.weather-grid)>.choice:not(.j31-cd-choice):nth-child(4n+3){border-color:#ad6fc0;background:linear-gradient(145deg,#efddff,#fff5fa);border-radius:26px 10px 12px 27px;box-shadow:4px 5px 0 #d3b9e777}
.paper.j31-polished .choices:not(.weather-grid)>.choice:not(.j31-cd-choice):nth-child(4n+4){border-color:#e7a03b;background:linear-gradient(145deg,#ffe6aa,#fff9d7);border-radius:11px 28px 28px 10px;box-shadow:4px 5px 0 #e9d39f99}
.paper.j31-polished .choices:not(.weather-grid)>.choice:not(.j31-cd-choice):hover{transform:translateY(-3px) rotate(-.35deg)}
.paper.j31-polished .choices:not(.weather-grid)>.choice:not(.j31-cd-choice)[aria-pressed=true]{outline:3px solid #4e2b65!important;outline-offset:2px;box-shadow:5px 6px 0 #ffca52!important;background:linear-gradient(145deg,#a7eee3,#fff2c5)!important}
.paper.j31-polished .reader-body .card{border:3px solid #dfa1bb;background:linear-gradient(135deg,#fff7ea,#ffecf4);box-shadow:7px 8px 0 #e7c2ae66;border-radius:8px 32px 9px 30px}
.paper.j31-polished .reader-body .card:nth-of-type(3n+1){border-color:#86c9c0;background:linear-gradient(135deg,#f0fffc,#fffae1)}
.paper.j31-polished .reader-body .card:nth-of-type(3n+2){border-color:#d6b3e5;background:linear-gradient(135deg,#f9f0ff,#fff4e2)}
@media(prefers-reduced-motion:reduce){.paper.j31-polished .choices:not(.weather-grid)>.choice:not(.j31-cd-choice){transition:none}}
