/* Scoped styles; papers retain their own accessible ink in every site theme. */
.fn-editor,.fn-admin{max-width:660px;margin:0 auto;color:var(--ink,#453d33)}.fn-top,.fn-author,.fn-actions,.fn-option,.fn-count,.fn-dialog header{display:flex;align-items:center;gap:12px;justify-content:space-between}.fn-top>span{font-size:9px;letter-spacing:1.8px;color:var(--muted,#85765f)}.fn-editor h1{font-size:clamp(24px,5vw,32px);margin:20px 0 6px}.fn-intro,.fn-hint{font-size:12px;color:var(--muted,#7f7465);line-height:1.8}.fn-author{justify-content:flex-start;margin:22px 0 15px}.fn-author img{border-radius:50%;object-fit:cover}.fn-author small{display:block;font-size:11px;color:var(--muted,#7f7465);margin-top:3px}.fn-writing{position:relative;border-radius:20px;overflow:hidden;border:1px solid #c5a45a66}.fn-writing #fn-background{position:absolute;inset:0}.fn-paper{position:relative;isolation:isolate;overflow:hidden;display:grid;place-items:center;min-width:0;height:220px;background:linear-gradient(140deg,#ffffff35,transparent 70%),var(--paper-bg,#fff3da);color:var(--paper-ink,#503b2a);border-radius:16px}.fn-paper>img{position:absolute;z-index:-1;inset:0;width:100%;height:100%;object-fit:cover}.fn-paper-text{white-space:pre-wrap;overflow-wrap:anywhere;text-align:center;line-height:1.8;font-weight:600;font-size:clamp(17px,2.8vw,22px);padding:24px 28px;max-width:100%;max-height:200px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical}.fn-paper.fn-full{height:auto;min-height:300px}.fn-full .fn-paper-text{display:block;max-height:none;overflow:visible;padding:42px 32px}.fn-writing .fn-paper{height:100%;min-height:100%;border-radius:0}.fn-writing textarea#fn-content{display:block;position:relative;z-index:1;width:100%;min-height:360px;max-height:60vh;resize:vertical;border:0;border-radius:0;background:transparent!important;box-shadow:none;color:var(--paper-ink);font-family:inherit;font-weight:600;font-size:clamp(17px,3vw,23px);line-height:1.9;text-align:center;padding:70px 28px 40px;overflow-wrap:anywhere}.fn-writing textarea::placeholder{color:inherit;opacity:.55}.fn-count{font-size:10px;min-height:28px;color:var(--muted,#7f7465)}.fn-option{width:100%;border:1px solid #bd9b583d;border-radius:14px;padding:14px 16px;margin-top:12px;background:transparent;color:inherit;font-size:13px;min-height:52px}.fn-option select{max-width:64%;min-width:0;font-size:12px;background:transparent;color:inherit;border:0}.fn-actions>*{flex:1}.fn-editor button,.fn-dialog button,.fn-admin button,.fn-compose-link{background:rgba(194,155,61,.10);border:1px solid rgba(180,140,52,.5);border-radius:12px;color:inherit;box-shadow:none;text-shadow:none;min-height:44px;padding:10px 14px;cursor:pointer;transition:background .15s,transform .15s}.fn-editor button:hover,.fn-dialog button:hover,.fn-admin button:hover,.fn-compose-link:hover{background:rgba(194,155,61,.2)}.fn-editor button:active,.fn-dialog button:active,.fn-compose-link:active{transform:translateY(1px)}.fn-editor :focus-visible,.fn-dialog :focus-visible,.fn-compose-link:focus-visible{outline:3px solid #ad812c;outline-offset:3px}.fn-actions{margin-top:20px}.fn-actions button[type=submit]{font-weight:700}.fn-dialog{width:min(540px,calc(100% - 24px));max-height:90svh;overflow:auto;border:1px solid #bf9b5366;border-radius:24px;padding:22px;background:var(--paper,#fffcf6);color:var(--ink,#453d33);box-shadow:0 12px 40px #0002}.fn-dialog::backdrop{background:#11182770}.fn-dialog header{margin-bottom:18px}.fn-dialog h2{font-size:19px;margin:0}.fn-dialog [data-close]{font-size:24px;padding:0;width:44px;flex-shrink:0}.fn-wallet{font-size:15px;color:inherit}.fn-tabs{display:flex;gap:8px;border-bottom:1px solid #bd9b5840;padding-bottom:14px}.fn-tabs button{flex:1;font-size:12px}.fn-tabs [aria-selected=true]{background:#d7b05a33;border-color:#a77a28}.fn-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px}.fn-dialog .fn-tile{padding:0 0 8px;border:0;background:transparent;min-width:0;text-align:center;font-size:11px}.fn-tile .fn-paper{height:auto;aspect-ratio:1;border:1px solid #c4ab7950;border-radius:14px}.fn-tile.is-selected .fn-paper{outline:2px solid #aa7c26;outline-offset:2px}.fn-tile strong,.fn-tile small,.fn-tile span{display:block;margin-top:6px;overflow-wrap:anywhere}.fn-rarity{font-size:10px;color:var(--muted,#7f7465)}.fn-confirm{width:100%;margin-top:10px}.fn-admin-link{display:block;text-align:center;font-size:12px;margin:24px}.fn-compose-row{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}.fn-compose-row .back{margin:0;min-width:0;font-size:12px}.fn-compose-link{display:inline-flex;align-items:center;gap:6px;text-decoration:none;font-size:12px;white-space:nowrap}.fn-compose-link svg{width:18px;height:18px}.fn-card .fn-card-head{padding:14px 16px;display:flex;gap:8px;align-items:center;justify-content:space-between}.fn-card .fn-paper{border-radius:0}.fn-card .fn-card-more{display:block;padding:8px 16px;font-size:11px;color:var(--muted)}.fn-card .fn-card-date{display:flex;flex-direction:column;gap:4px;font-size:10px}.fn-card .fn-card-menu{padding:0 16px 12px;display:flex;gap:14px;font-size:11px}.fn-card .social-bar{border-top:1px solid var(--line,#ddd)}.fn-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.fn-admin-row{display:block;width:100%;text-align:start;margin:10px 0}.fn-admin-row span{display:block;font-size:12px;margin-top:4px}.fn-dialog form label{display:block;margin:12px 0;font-size:13px}.fn-dialog form input:not([type=checkbox]),.fn-dialog form select{width:100%;margin-top:6px}.fn-dialog form input[type=color]{height:40px}.fn-history{font-size:11px;overflow-wrap:anywhere;padding:10px 0;border-bottom:1px solid #bc9c5840}
html:is([data-theme=dark],[data-theme=fantasy]) .fn-dialog{background:#192638;color:#f2eadb}html:is([data-theme=dark],[data-theme=fantasy]) .fn-editor,html:is([data-theme=dark],[data-theme=fantasy]) .fn-admin{color:#f2eadb}html:is([data-theme=dark],[data-theme=fantasy]) :is(.fn-hint,.fn-intro,.fn-count,.fn-author small,.fn-rarity){color:#c4c9d0}html:is([data-theme=dark],[data-theme=fantasy]) .fn-dialog input,html:is([data-theme=dark],[data-theme=fantasy]) .fn-dialog select{background:#233248;color:#f2eadb}
@media(max-width:380px){.fn-top>span{display:none}.fn-actions{gap:8px}.fn-actions button{font-size:12px;padding:10px 7px}.fn-dialog{padding:16px}.fn-grid{gap:12px 8px}.fn-tile strong{font-size:10px}.fn-compose-row{gap:8px}.fn-compose-link{padding:8px 10px}.fn-option{padding:12px 10px;gap:6px}.fn-option strong{font-size:11px}.fn-writing textarea#fn-content{padding:55px 22px 35px}}
@media(prefers-reduced-motion:reduce){.fn-editor *,.fn-dialog *{transition:none}}
/* Override the site's legacy metallic button skin only inside this feature. */
html body #main .fn-editor button,html body #main .fn-admin button,html body .fn-dialog button,html body #main a.fn-compose-link{background:rgba(194,155,61,.10)!important;background-image:none!important;border:1px solid rgba(180,140,52,.5)!important;box-shadow:none!important;text-shadow:none!important;color:inherit!important;-webkit-text-fill-color:currentColor!important;filter:none!important;animation:none!important;backdrop-filter:none!important}
html body #main .fn-editor button:hover,html body .fn-dialog button:hover,html body #main a.fn-compose-link:hover{background:rgba(194,155,61,.20)!important}
html body .fn-dialog button.fn-tile{background:transparent!important;border:0!important;padding:0 0 8px!important}
html body .fn-dialog .fn-tabs button[aria-selected=true]{background:rgba(194,155,61,.25)!important}
html body #main .fn-editor button::before,html body #main .fn-editor button::after,html body .fn-dialog button::before,html body .fn-dialog button::after,html body #main .fn-admin button::before,html body #main .fn-admin button::after,html body #main .fn-compose-link::before,html body #main .fn-compose-link::after{display:none!important}

/* Ruled writing paper: compact size and lines that scroll with the text. */
html body #main .fn-writing textarea#fn-content{
 height:280px;min-height:240px;max-height:60vh;
 padding:22px 24px 26px;font-size:18px;line-height:32px;
 background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 31px,rgba(141,110,61,.22) 31px,rgba(141,110,61,.22) 32px)!important;
 background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 31px,color-mix(in srgb,currentColor 18%,transparent) 31px,color-mix(in srgb,currentColor 18%,transparent) 32px)!important;
 background-size:100% 32px!important;background-origin:content-box!important;background-clip:content-box!important;background-attachment:local!important;
}
@media(max-width:620px){html body #main .fn-writing textarea#fn-content{height:256px;padding:20px 20px 24px;font-size:17px}}

/* Public note visibility sits on the lower-right corner of its paper. */
.fn-card-paper{position:relative}
.fn-card .fn-paper-visibility{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:2}
.fn-card .fn-paper-visibility>.visibility{position:static!important;inset:auto!important;transform:none!important;margin:0!important;box-shadow:none}

/* Journal grid: paper notes share the same square tiles as photo entries. */
#main.journal-view #posts[data-layout=instagram]>.fn-card{grid-column:auto;min-width:0;border-radius:5px;overflow:hidden;box-shadow:none}
#main.journal-view #posts[data-layout=instagram]>.fn-card>:is(.fn-card-head,.social-bar,.fn-card-menu){display:none}
#main.journal-view #posts[data-layout=instagram]>.fn-card>a[data-nav]{display:block;aspect-ratio:1;overflow:hidden}
#main.journal-view #posts[data-layout=instagram] .fn-card .fn-card-more{display:none}
#main.journal-view #posts[data-layout=instagram] .fn-card .fn-card-paper{height:100%}
#main.journal-view #posts[data-layout=instagram] .fn-card .fn-paper{height:100%;min-height:0;aspect-ratio:1;border-radius:0}
#main.journal-view #posts[data-layout=instagram] .fn-card .fn-paper-text{font-size:clamp(11px,2.7vw,15px);line-height:1.65;padding:12px 10px;max-height:100%;-webkit-line-clamp:3}
#main.journal-view #posts[data-layout=instagram] .fn-card .fn-paper-visibility{right:5px;bottom:5px}
#main.journal-view #posts[data-layout=instagram] .fn-card .fn-paper-visibility>.visibility{font-size:11px;padding:2px;min-width:20px;min-height:20px}

/* Comment previews stay in list/detail views, outside compact journal tiles. */
#main.journal-view #posts[data-layout=instagram] .feed-comment-preview{display:none!important}

.fn-line-options{display:flex;gap:8px;margin:10px 0 14px}
html body .fn-line-options button{flex:1;min-width:0;min-height:44px;padding:8px 12px;border:1px solid #b4945366;border-radius:12px;background:#b4945310;color:var(--ink,#453d33);font:inherit;font-size:14px;box-shadow:none}
html body .fn-line-options button[aria-pressed=true]{background:#b4945328;border-color:#a78641;font-weight:600}
.fn-line-options button:focus-visible{outline:2px solid #ad8b40;outline-offset:3px}
html body #main .fn-writing.fn-no-lines textarea#fn-content{background-image:none!important}
