/* Clearer paths into chat and story modes, with one consistent glass surface. */
.sidebar nav em{font-style:normal}
.sidebar nav .nav-secondary{opacity:.8}
.sidebar nav .nav-secondary:first-of-type{margin-top:12px}
.hero{height:270px;margin-bottom:16px;box-shadow:0 16px 45px #a96f9217}
.hero-copy{padding:37px 40px}
.hero h1{font-size:clamp(1.65rem,2.7vw,2.35rem);line-height:1.37;margin:0 0 12px}
.hero p{max-width:360px;font-size:.91rem;line-height:1.75}
.mode-chooser{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-bottom:34px}
.mode-tile{display:flex;align-items:center;gap:16px;min-width:0;padding:20px 22px;border:1px solid #fff;border-radius:20px;background:#fffafddd;box-shadow:0 9px 28px #aa6f9210;transition:transform .16s,box-shadow .16s}
.mode-tile:hover{transform:translateY(-2px);box-shadow:0 14px 30px #aa6f9225}
.mode-tile-story{background:linear-gradient(115deg,#fff6fc,#f5ddec)}
.mode-icon{width:48px;height:48px;display:grid;place-items:center;flex:none;border-radius:16px;background:#f9e1ed;color:#b85483;font-size:1.5rem}
.mode-tile-story .mode-icon{background:#eadcf3;color:#925ea4}
.mode-tile>span:nth-child(2){display:grid;gap:3px;min-width:0}
.mode-tile small{font-size:.67rem;color:#a27b93}
.mode-tile strong{font-size:1rem;color:#6f3758}
.mode-tile em{font-size:.76rem;color:#8e7183;font-style:normal;line-height:1.5}
.mode-tile b{margin-left:auto;color:#b45d8b;font-size:1.25rem;font-weight:400}
.character-card,.world-card{box-shadow:0 12px 30px #9e638214}
.character-card .primary{background:linear-gradient(115deg,#e88db4,#d18db7);color:#fff;border:0}
.character-card .primary:hover{background:#d977a6;color:#fff}
.world-recent{margin:0 0 32px;padding:20px 22px;border:1px solid #f0d7e6;border-radius:21px;background:#fff9fcd9}
.world-recent .section-heading{margin-bottom:12px}
.world-recent-list a{align-items:center;background:#fff;border-color:#f0d6e5;min-width:0}
.world-recent-list strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.world-recent-list span{color:#a54e7d;font-weight:600}
.world-card{display:flex;flex-direction:column}
.world-cover{height:190px;min-height:0;flex:none;background-position:center 28%}
.world-cover-name{bottom:17px}
.world-card-body{padding:22px;flex:1}
.world-card-body>p{min-height:2.8em}
.world-goal{margin-top:auto}
.world-guide{margin:12px 0}
.world-card-body form{margin-top:0}
.chat-main .messages{background:transparent}
.chat-main .bubble{backdrop-filter:blur(12px)}
@media(max-width:980px) and (min-width:701px){.sidebar nav em{display:none}}
@media(max-width:700px){
  .sidebar{position:fixed;top:auto;right:10px;bottom:calc(9px + env(safe-area-inset-bottom));left:10px;inset:auto 10px calc(9px + env(safe-area-inset-bottom));width:auto;height:62px;margin:0;padding:6px 8px;z-index:30;border-radius:21px;background:#fff8fce8;backdrop-filter:blur(24px) saturate(140%);box-shadow:0 8px 30px #7e4e762b}
  .sidebar .brand,.sidebar .nav-label,.sidebar .sidebar-bottom{display:none}
  .sidebar nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;width:100%;margin:0}
  .sidebar nav a{display:flex;flex-direction:column;gap:1px;padding:4px 2px;min-width:0;font-size:.64rem;line-height:1.1;border-radius:14px}
  .sidebar nav a span{font-size:1.16rem;line-height:1.25}
  .sidebar nav a em{display:block;font-size:.64rem;font-style:normal;white-space:nowrap}
  .sidebar nav .nav-secondary{display:none}
  .sidebar nav a.active{box-shadow:none;background:#f8dfeb;border-color:transparent}
  .workspace{margin:0;padding-bottom:calc(80px + env(safe-area-inset-bottom))}
  .topbar{height:54px;margin:0 16px;padding:0}
  .topbar>span{font-weight:600;color:#81516f}
  .page{padding:16px}
  .hero{height:250px;margin-bottom:12px}
  .hero-copy{padding:25px 22px}
  .hero h1{font-size:1.52rem;line-height:1.35}
  .hero p{font-size:.8rem;max-width:265px}
  .mode-chooser{gap:9px;margin-bottom:27px}
  .mode-tile{padding:12px;gap:9px;border-radius:16px;align-items:flex-start}
  .mode-icon{width:34px;height:34px;border-radius:11px;font-size:1.15rem}
  .mode-tile strong{font-size:.83rem}
  .mode-tile em{font-size:.68rem}
  .mode-tile b{display:none}
  .world-intro{padding:22px;margin-bottom:22px}
  .world-intro h1{font-size:1.48rem}
  .world-recent{padding:16px;margin-bottom:24px}
  .world-card{display:flex;flex-direction:column}
  .world-cover{height:158px;min-height:0}
  .world-card-body{padding:18px}
  .world-card-body>p{min-height:0}
  .world-goal{margin-top:0}
  body.chat-open .workspace{padding-bottom:0}
  body.chat-open .sidebar{display:none}
  body.chat-open .context-note-routine{display:none}
  body.chat-open .chat-header{min-height:58px}
  body.chat-open .composer-settings{display:flex;gap:8px;margin-bottom:5px}
  body.chat-open .composer-settings label{margin:0;flex:none}
  body.chat-open .composer-settings select{min-width:0;flex:1;padding:5px 7px}
  body.chat-open .composer textarea{min-height:44px}
  body.chat-open .story-actions{padding:7px 12px;gap:4px}
  body.chat-open .story-actions>span{font-size:.7rem}
}
@media(max-width:390px){
  .mode-chooser{grid-template-columns:1fr}
  .mode-tile{align-items:center}
  .mode-tile b{display:block}
  .hero{height:235px}
  .hero p{max-width:225px}
}
